This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: need to define _ISOC99_SOURCE



| Akim Demaille writes:
| > 
| > Here is a proto patch.  I send it mainly because I think we can
| > simplify the approach in Autoconf a lot: my proposal always defines
| > _GNU_SOURCE and _ALL_SOURCE,
| 
| And _HPUX_SOURCE ? I'd like to compile GNU packages with "cc -Aa"
| instead of "cc -Aa -D_HPUX_SOURCE" on HP-UX.

I was just waiting for someone to tell me it was that simple :)  Do
you have any particular documentation string to suggest?


| > Also, I used a protected form for both (with ifndef guards).  I don't
| > think it is useful as config.h is expected to be the first file
| > included.
| 
| It is useful because _GNU_SOURCE (or _ALL_SOURCE or _HPUX_SOURCE) may
| already be present in the CFLAGS the user has set.

Should she?  Should we really consider this case?  I mean, I never
heard of any complaints, nor did Paul IIUC, for _GNU_SOURCE etc. being
not guarded in confdefs.h.  OTOH the messages are probably in
config.log.

Well, I'm not much in favor of this.  Ideally config.h has no reason
to be any different from the old collection of -D.


| > I am also tempted to define unconditionally these symbols:
| > 
| > #define _POSIX_SOURCE 1
| > #define _POSIX_1_SOURCE 2
| > 
| > since they cover those two macros:
| > 
| > | # AC_MINIX
| 
| _POSIX_SOURCE may be ok for MINIX, but on other platforms is causes
| more harm than good. On Solaris, _POSIX_SOURCE causes lots of APIs to
| be *not* declared.

OK, that's what I wanted to hear.  Thanks!



| Btw, gettext snapshots have a different test:
| 
| AC_DEFUN(AC_ISC_POSIX,
|   [AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])]
| )

Good, will do that.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]