]> git.cworth.org Git - apitrace/commitdiff
Define _GNU_SOURCE for the whole tree.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 4 May 2013 08:33:41 +0000 (09:33 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 4 May 2013 08:33:41 +0000 (09:33 +0100)
As not all dlfnc.h includes define it consistently.

CMakeLists.txt
dispatch/glproc_egl.cpp
wrappers/glxtrace.py

index 91643c2f107fe98952f930ac6777f41f57cfdeee..2bfa07ef24d2d882dd538baa1eaa209fd7b23c48 100644 (file)
@@ -174,6 +174,11 @@ if (MINGW)
     endif ()
 endif ()
 
+if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+    # For RTLD_DEFAULT and RTLD_NEXT
+    add_definitions (-D_GNU_SOURCE)
+endif ()
+
 
 # Put all executables into the same top level build directory, regardless of
 # which subdirectory they are declared
index 5f93b14da016d4e2bc4772a08a4b4eb99f3336e4..c77c444b8d7ff3dc8cb5b97b573c20520f146398 100644 (file)
@@ -28,9 +28,6 @@
 
 
 #if !defined(_WIN32)
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE // for dladdr
-#endif
 #include <dlfcn.h>
 #endif
 
index 9c0f87dbcb443fba7fd520317368877062550c33..8f83f313360c682215a8865eb44df121fadacc89 100644 (file)
@@ -86,9 +86,6 @@ if __name__ == '__main__':
     print '#include <stdlib.h>'
     print '#include <string.h>'
     print
-    print '#ifndef _GNU_SOURCE'
-    print '#define _GNU_SOURCE // for dladdr'
-    print '#endif'
     print '#include <dlfcn.h>'
     print
     print '#include "trace_writer_local.hpp"'