[2852] in BarnOwl Developers
Re: [PATCH] Fix up feature macros somewhat
daemon@ATHENA.MIT.EDU (Nelson Elhage)
Tue Jan 4 14:49:21 2011
In-Reply-To: <1294161251-5664-1-git-send-email-davidben@mit.edu>
Date: Tue, 4 Jan 2011 14:49:18 -0500
From: Nelson Elhage <nelhage@nelhage.com>
To: David Benjamin <davidben@MIT.EDU>
Cc: barnowl-dev@MIT.EDU
sgtm, assuming you've build-tested everywhere
On Tue, Jan 4, 2011 at 12:14 PM, David Benjamin <davidben@mit.edu> wrote:
> 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>
> ---
> =C2=A0configure.ac | =C2=A0 =C2=A07 ++++---
> =C2=A01 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_STR=
ING_TO_KEY" && dnl
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0test "$HAVE_DES_KEY_SCHED" && =
dnl
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0test "$HAVE_DES_ECB_ENCRYPT"])
>
> -AM_CFLAGS=3D"$AM_CFLAGS -D_XOPEN_SOURCE"
> -dnl __EXTENSIONS__ is needed for struct timeval on Solaris when
> -dnl _XOPEN_SOURCE is defined.
> +AM_CFLAGS=3D"$AM_CFLAGS -D_XOPEN_SOURCE=3D500"
> +dnl Define _BSD_SOURCE because zephyr needs cattr_t.
> +AM_CFLAGS=3D"$AM_CFLAGS -D_BSD_SOURCE"
> +dnl Define __EXTENSIONS__ for strcasecmp on Solaris.
> =C2=A0AM_CFLAGS=3D"$AM_CFLAGS -D__EXTENSIONS__"
>
> =C2=A0AC_SUBST([AM_CFLAGS])
> --
> 1.7.3.3.399.g06ddf
>
>