summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/xemacs/files/xemacs-21.4.24-glibc-macro.patch')
-rw-r--r--app-editors/xemacs/files/xemacs-21.4.24-glibc-macro.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/app-editors/xemacs/files/xemacs-21.4.24-glibc-macro.patch b/app-editors/xemacs/files/xemacs-21.4.24-glibc-macro.patch
new file mode 100644
index 00000000000..62d26ccc053
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.4.24-glibc-macro.patch
@@ -0,0 +1,28 @@
+Don't define deprecated glibc symbol
+
+Avoid defining the deprecated symbols _BSD_SOURCE and _SVID_SOURCE
+that xmkmf thinks are needed to compile X programs.
+
+diff -r 09d56098ea2c -r 32a8151f8af7 configure.in
+--- a/configure.in Sat Feb 11 01:24:06 2017 +0100
++++ b/configure.in Sat Feb 11 01:59:40 2017 +0100
+@@ -2868,10 +2868,15 @@
+ * ) val=1 ;;
+ esac
+ dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
+- if grep "^#define $sym " confdefs.h >/dev/null; then :; else
+- if test "$val" = "1"
+- then AC_DEFINE_UNQUOTED($sym)
+- else AC_DEFINE_UNQUOTED($sym,$val)
++dnl Also, glibc doesn't like two of the traditional POSIX macros that xmkmf
++dnl likes us to define; ignore them if appropriate.
++ if grep "^#define $sym " confdefs.h >/dev/null || \
++ test "$have_glibc" = "yes" -a "$sym" = "_BSD_SOURCE" || \
++ test "$have_glibc" = "yes" -a "$sym" = "_SVID_SOURCE";
++ then :; else
++ if test "$val" = "1"
++ then AC_DEFINE_UNQUOTED($sym)
++ else AC_DEFINE_UNQUOTED($sym,$val)
+ fi
+ fi ;;
+ esac