Pass 1 at building on linux: remove compile errors from machine independent.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20536 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
dadf945fd7
commit
54d8cda95e
24 changed files with 176 additions and 172 deletions
|
|
@ -39,10 +39,14 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#include <basetsd.h>
|
||||
#define snprintf sprintf_s
|
||||
#define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args))
|
||||
#elif defined (solaris)
|
||||
#define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
|
||||
#include <sys/int_types.h>
|
||||
#define UINT_PTR uintptr_t
|
||||
#else
|
||||
#define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
|
||||
#include <stdint.h>
|
||||
#define UINT_PTR uintptr_t
|
||||
#endif
|
||||
|
|
@ -60,11 +64,10 @@
|
|||
#include <list>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
typedef int TSourceLoc;
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "PoolAlloc.h"
|
||||
|
||||
//
|
||||
|
|
@ -171,9 +174,9 @@ __inline TPersistString FormatSourceLoc(const TSourceLoc loc)
|
|||
int line = loc & SourceLocLineMask;
|
||||
|
||||
if (line)
|
||||
sprintf_s(locText, maxSize, "%d:%d", string, line);
|
||||
snprintf(locText, maxSize, "%d:%d", string, line);
|
||||
else
|
||||
sprintf_s(locText, maxSize, "%d:? ", string);
|
||||
snprintf(locText, maxSize, "%d:? ", string);
|
||||
|
||||
return TPersistString(locText);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue