remove #ifndef linux, it isnt defined on Linux, where should I define it?
authorMichal Krol <mjkrol@gmail.org>
Tue, 18 Jan 2005 14:21:50 +0000 (14:21 +0000)
committerMichal Krol <mjkrol@gmail.org>
Tue, 18 Jan 2005 14:21:50 +0000 (14:21 +0000)
src/mesa/shader/slang/OSDependent/Linux/osinclude.h

index df45958..e71ede0 100755 (executable)
@@ -1,77 +1,73 @@
-//\r
-//Copyright (C) 2002-2004  3Dlabs Inc. Ltd.\r
-//All rights reserved.\r
-//\r
-//Redistribution and use in source and binary forms, with or without\r
-//modification, are permitted provided that the following conditions\r
-//are met:\r
-//\r
-//    Redistributions of source code must retain the above copyright\r
-//    notice, this list of conditions and the following disclaimer.\r
-//\r
-//    Redistributions in binary form must reproduce the above\r
-//    copyright notice, this list of conditions and the following\r
-//    disclaimer in the documentation and/or other materials provided\r
-//    with the distribution.\r
-//\r
-//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its\r
-//    contributors may be used to endorse or promote products derived\r
-//    from this software without specific prior written permission.\r
-//\r
-//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
-//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
-//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\r
-//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
-//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r
-//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
-//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
-//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r
-//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
-//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r
-//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
-//POSSIBILITY OF SUCH DAMAGE.\r
-//\r
-\r
-#ifndef __OSINCLUDE_H\r
-#define __OSINCLUDE_H\r
-\r
-//\r
-// This file contains any Linux specific functions.\r
-//\r
-\r
-#if !(defined(linux))\r
-#error Trying to include a Linux specific file in a non-Linux build.\r
-#endif\r
-\r
-#include <pthread.h>\r
-#include <semaphore.h>\r
-#include <assert.h>\r
-#include <errno.h>\r
-#include "Include/InitializeGlobals.h"\r
-#include "Include/PoolAlloc.h"\r
-\r
-#define _vsnprintf vsnprintf\r
-\r
-void DetachThreadLinux(void *);\r
-\r
-//\r
-// Thread Local Storage Operations\r
-//\r
-typedef unsigned int OS_TLSIndex;\r
-#define OS_INVALID_TLS_INDEX 0xFFFFFFFF\r
-\r
-OS_TLSIndex OS_AllocTLSIndex();\r
-bool        OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);\r
-bool        OS_FreeTLSIndex(OS_TLSIndex nIndex); \r
-\r
-\r
-inline void * OS_GetTLSValue(OS_TLSIndex nIndex)\r
-{\r
-    //\r
-    // This function should return 0 if nIndex is invalid.\r
-    //\r
-    assert(nIndex != OS_INVALID_TLS_INDEX);\r
-    return (pthread_getspecific(nIndex)); \r
-}\r
-\r
-#endif // __OSINCLUDE_H\r
+//
+//Copyright (C) 2002-2004  3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+//
+
+#ifndef __OSINCLUDE_H
+#define __OSINCLUDE_H
+
+//
+// This file contains any Linux specific functions.
+//
+
+#include <pthread.h>
+#include <semaphore.h>
+#include <assert.h>
+#include <errno.h>
+#include "Include/InitializeGlobals.h"
+#include "Include/PoolAlloc.h"
+
+#define _vsnprintf vsnprintf
+
+void DetachThreadLinux(void *);
+
+//
+// Thread Local Storage Operations
+//
+typedef unsigned int OS_TLSIndex;
+#define OS_INVALID_TLS_INDEX 0xFFFFFFFF
+
+OS_TLSIndex OS_AllocTLSIndex();
+bool        OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);
+bool        OS_FreeTLSIndex(OS_TLSIndex nIndex); 
+
+
+inline void * OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+    //
+    // This function should return 0 if nIndex is invalid.
+    //
+    assert(nIndex != OS_INVALID_TLS_INDEX);
+    return (pthread_getspecific(nIndex)); 
+}
+
+#endif // __OSINCLUDE_H