[2854] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [PATCH] Fix up feature macros somewhat

daemon@ATHENA.MIT.EDU (David A Benjamin)
Tue Jan 4 16:44:04 2011

Date: Tue, 4 Jan 2011 16:43:58 -0500 (EST)
From: David A Benjamin <davidben@MIT.EDU>
To: Karl Ramm <kcr@1ts.org>
cc: Nelson Elhage <nelhage@nelhage.com>, barnowl-dev@mit.edu
In-Reply-To: <uustyhoiclp.fsf@1ts.org>

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---1257051904-626832939-1294177438=:15170
Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE



On Tue, 4 Jan 2011, Karl Ramm wrote:

> cattr_t or caddr_t?

I believe it was caddr_t. If you still have logs that far back, see -c=20
barnowl -i _XOPEN_SOURCE. On my system (Ubuntu), caddr_t is defined in=20
sys/types.h, conditioned on __USE_BSD.

 =09#ifdef  __USE_BSD
 =09# ifndef __daddr_t_defined
 =09typedef __daddr_t daddr_t;
 =09typedef __caddr_t caddr_t;
 =09#  define __daddr_t_defined
 =09# endif
 =09#endif

(Where __caddr_t appears to be defined to char* unconditionally in=20
bits/types.h.) __USE_BSD is defined in features.h given _BSD_SOURCE.

 =09#ifdef  _BSD_SOURCE
 =09# define __USE_BSD      1
 =09#endif

_BSD_SOURCE doesn't seem to be automatically defined by anyone other than=
=20
_GNU_SOURCE (and some block that turns it on by default if you don't=20
specify anything).

I don't see any constraints on its definition on multics, also to char*.

David


> Nelson Elhage <nelhage@nelhage.com> writes:
>
>> 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_S=
TRING_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
>>>
>>>
>
---1257051904-626832939-1294177438=:15170--

home help back first fref pref prev next nref lref last post