Changes to compile translator_glsl on linux.
Review URL: http://codereview.appspot.com/1153043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@254 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 63b9684..7141b0c 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -180,16 +180,16 @@
{
char szExtraInfo[400];
va_list marker;
-
+
va_start(marker, szExtraInfoFormat);
-
- _vsnprintf(szExtraInfo, sizeof(szExtraInfo), szExtraInfoFormat, marker);
-
+
+ vsnprintf(szExtraInfo, sizeof(szExtraInfo), szExtraInfoFormat, marker);
+
/* VC++ format: file(linenum) : error #: 'token' : extrainfo */
infoSink.info.prefix(EPrefixError);
infoSink.info.location(nLine);
infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n";
-
+
va_end(marker);
++numErrors;
diff --git a/src/compiler/PoolAlloc.cpp b/src/compiler/PoolAlloc.cpp
index 9355a12..9c164b0 100644
--- a/src/compiler/PoolAlloc.cpp
+++ b/src/compiler/PoolAlloc.cpp
@@ -10,7 +10,7 @@
#include "compiler/Common.h"
#include "compiler/InitializeGlobals.h"
-OS_TLSIndex PoolIndex = TLS_OUT_OF_INDEXES;
+OS_TLSIndex PoolIndex = OS_INVALID_TLS_INDEX;
void InitializeGlobalPools()
{
diff --git a/src/compiler/ossource_posix.cpp b/src/compiler/ossource_posix.cpp
index c890f79..1e1e699 100644
--- a/src/compiler/ossource_posix.cpp
+++ b/src/compiler/ossource_posix.cpp
@@ -14,53 +14,6 @@
#endif
//
-// Thread cleanup
-//
-
-//
-// Wrapper for Linux call to DetachThread.
-// This is required as pthread_cleanup_push() expects the cleanup routine
-// to return void.
-//
-void DetachThreadLinux(void *)
-{
- DetachThread();
-}
-
-//
-// Registers cleanup handler, sets cancel type and state, and excecutes
-// the thread specific cleanup handler. When OpenGL applications are run with
-// the driver code, Linux OS does the thread cleanup.
-//
-void OS_CleanupThreadData(void)
-{
- int old_cancel_state, old_cancel_type;
- void *cleanupArg = NULL;
-
- //
- // Set thread cancel state and push cleanup handler.
- //
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
- pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg);
-
- //
- // Put the thread in deferred cancellation mode.
- //
- pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type);
-
- //
- // Pop cleanup handler and execute it prior to unregistering
- // the cleanup handler.
- //
- pthread_cleanup_pop(1);
-
- //
- // Restore the thread's previous cancellation mode.
- //
- pthread_setcanceltype(old_cancel_state, NULL);
-}
-
-//
// Thread Local Storage Operations
//
OS_TLSIndex OS_AllocTLSIndex()