Build on newer glibc.
authorStas Boukarev <stassats@gmail.com>
Mon, 4 Feb 2013 12:06:22 +0000 (16:06 +0400)
committerStas Boukarev <stassats@gmail.com>
Mon, 4 Feb 2013 12:06:22 +0000 (16:06 +0400)
Newer glibc don't like the usage of #define __USE_GNU, use _GNU_SOURCE
instead.
Fixes lp#1095036

NEWS
src/runtime/backtrace.c
src/runtime/os-common.c
src/runtime/x86-64-linux-os.c

diff --git a/NEWS b/NEWS
index 2ac0eb7..057fefa 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@ changes relative to sbcl-1.1.4:
   * enhancement: SB-POSIX now provides MAP-ANON.
   * bug fix: no more unused variable style warnings from RESTART-CASE
     macroexpansion (lp#1113859)
   * enhancement: SB-POSIX now provides MAP-ANON.
   * bug fix: no more unused variable style warnings from RESTART-CASE
     macroexpansion (lp#1113859)
+  * bug fix: no more unused variable style warnings when loading
+    sb-bsd-sockets.asd (lp#1114681)
   * bug fix: deleting a package removes it from implementation-package
     lists of other packages.
   * bug fix: SB-SPROF:WITH-PROFILING is now usable in the Slime REPL on Darwin.
   * bug fix: deleting a package removes it from implementation-package
     lists of other packages.
   * bug fix: SB-SPROF:WITH-PROFILING is now usable in the Slime REPL on Darwin.
@@ -33,6 +35,7 @@ changes relative to sbcl-1.1.4:
   * bug fix: (setf (documentation 'x 'function)) and
     (setf (documentation #'x t)) set documentation in different places.
     (regression since 1.0.43.63)
   * bug fix: (setf (documentation 'x 'function)) and
     (setf (documentation #'x t)) set documentation in different places.
     (regression since 1.0.43.63)
+  * bug fix: build on newer glibc. (lp#1095036)
 
 changes in sbcl-1.1.4 relative to sbcl-1.1.3:
   * optimization: LOOP expressions using "of-type character" have slightly
 
 changes in sbcl-1.1.4 relative to sbcl-1.1.3:
   * optimization: LOOP expressions using "of-type character" have slightly
index c618ca7..5585122 100644 (file)
@@ -13,6 +13,9 @@
  * files for more information.
  */
 
  * files for more information.
  */
 
+/* needed if we want dladdr() and Dl_Info from glibc's dlfcn.h */
+#define _GNU_SOURCE
+
 #include <stdio.h>
 #include <signal.h>
 #include "sbcl.h"
 #include <stdio.h>
 #include <signal.h>
 #include "sbcl.h"
 #include "thread.h"
 
 #ifdef LISP_FEATURE_OS_PROVIDES_DLADDR
 #include "thread.h"
 
 #ifdef LISP_FEATURE_OS_PROVIDES_DLADDR
-# ifndef __USE_GNU
-/* __USE_GNU needed if we want dladdr() and Dl_Info from glibc. */
-# define __USE_GNU
-# endif
-# include "dlfcn.h"
+# include <dlfcn.h>
 #endif
 
 #if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64))
 #endif
 
 #if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64))
index c5e082f..f57b643 100644 (file)
@@ -8,7 +8,7 @@
  * provided with absolutely no warranty. See the COPYING and CREDITS
  * files for more information.
  */
  * provided with absolutely no warranty. See the COPYING and CREDITS
  * files for more information.
  */
-
+# define _GNU_SOURCE /* needed for RTLD_DEFAULT from dlfcn.h */
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
@@ -27,7 +27,6 @@
 #include "os.h"
 #include "interr.h"
 #if defined(LISP_FEATURE_OS_PROVIDES_DLOPEN) && !defined(LISP_FEATURE_WIN32)
 #include "os.h"
 #include "interr.h"
 #if defined(LISP_FEATURE_OS_PROVIDES_DLOPEN) && !defined(LISP_FEATURE_WIN32)
-# define __USE_GNU /* needed for RTLD_DEFAULT */
 # include <dlfcn.h>
 #endif
 
 # include <dlfcn.h>
 #endif
 
index d3d2c30..e012289 100644 (file)
@@ -14,6 +14,8 @@
  * files for more information.
  */
 
  * files for more information.
  */
 
+#define _GNU_SOURCE /* for REG_RAX etc. from sys/ucontext */
+
 #include <stdio.h>
 #include <stddef.h>
 #include <sys/param.h>
 #include <stdio.h>
 #include <stddef.h>
 #include <sys/param.h>
 #include <unistd.h>
 #include <errno.h>
 
 #include <unistd.h>
 #include <errno.h>
 
-#define __USE_GNU
 #include <sys/ucontext.h>
 #include <sys/ucontext.h>
-#undef __USE_GNU
-
 
 #include "./signal.h"
 #include "os.h"
 
 #include "./signal.h"
 #include "os.h"