[2850] in BarnOwl Developers
[PATCH] Fix up feature macros somewhat
daemon@ATHENA.MIT.EDU (David Benjamin)
Tue Jan 4 12:14:37 2011
From: David Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
Date: Tue, 4 Jan 2011 12:14:11 -0500
Set _XOPEN_SOURCE to 500 to target a sufficiently new standard. Also
define _BSD_SOURCE because zephyr needs a BSD extension (caddr_t).
Apparently both of these bugs were masked on Debathena because Ubuntu's
perl defines _GNU_SOURCE which turns everything on.
This also removes the need for __EXTENSIONS__ to get struct timeval on
Solaris. But we can't quite get rid of it yet because we use strcasecmp
and MAXHOSTNAMELEN.
Reported-By: Alex Vandiver <alexmv@mit.edu>
---
configure.ac | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6a8e89f..d40e6e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,9 +138,10 @@ AM_CONDITIONAL([ENABLE_ZCRYPT], [test "$HAVE_DES_STRING_TO_KEY" && dnl
test "$HAVE_DES_KEY_SCHED" && dnl
test "$HAVE_DES_ECB_ENCRYPT"])
-AM_CFLAGS="$AM_CFLAGS -D_XOPEN_SOURCE"
-dnl __EXTENSIONS__ is needed for struct timeval on Solaris when
-dnl _XOPEN_SOURCE is defined.
+AM_CFLAGS="$AM_CFLAGS -D_XOPEN_SOURCE=500"
+dnl Define _BSD_SOURCE because zephyr needs cattr_t.
+AM_CFLAGS="$AM_CFLAGS -D_BSD_SOURCE"
+dnl Define __EXTENSIONS__ for strcasecmp on Solaris.
AM_CFLAGS="$AM_CFLAGS -D__EXTENSIONS__"
AC_SUBST([AM_CFLAGS])
--
1.7.3.3.399.g06ddf