bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is IRIX 6.5 obsolete?


From: Bruno Haible
Subject: Re: Is IRIX 6.5 obsolete?
Date: Tue, 22 May 2012 11:38:20 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Simon Josefsson wrote:
> It was configured with:
> 
> CC=c89 CFLAGS="-D_POSIX_SOURCE -I/usr/local/include" ...

Bingo. On many platforms, the _POSIX_SOURCE macro has the effect of
*hiding* declarations, not of enabling them:

$ uname -srv 
IRIX64 6.5 10060437
$ cat foo.c
#include <string.h>
$ cc -E foo.c | grep strdup
extern char *strdup(const char *);
$ c89 -E foo.c | grep strdup
extern char *strdup(const char *);
$ c89 -D_POSIX_SOURCE -E foo.c | grep strdup

Autoconf's and Gnulib's 'extensions' macro does a good job at enabling
most useful declarations, but it cannot prevail against a user who specifies
_POSIX_SOURCE.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]