GNU bug report logs - #9141
Coreutils Compiler Warnings on OSX 10.7 (Lion)

Previous Next

Package: coreutils;

Reported by: Herb Wartens <hawartens <at> gmail.com>

Date: Thu, 21 Jul 2011 16:05:02 UTC

Severity: normal

Tags: moreinfo

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 9141 <at> debbugs.gnu.org, bug-gnulib <at> gnu.org
Subject: bug#9141: [PATCH 1/3] extensions: Enable extensions on MacOS X 10.5	and later.
Date: Sat, 23 Jul 2011 11:34:05 -0700
On 07/22/11 17:23, Bruno Haible wrote:
> The usual idiom in the MacOS X header files is
> 
>   #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
> 
> So, I expect that your change will be a no-op for almost everyone.

Thanks for the clarification.

I looked through what I could glean from Google searches, and
found some places that do not use the above pattern.  For example,
<http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/sys/select.h>
says something like this:

int	 pselect(int, fd_set * __restrict, fd_set * __restrict,
		fd_set * __restrict, const struct timespec * __restrict,
		const sigset_t * __restrict)
#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)
		__DARWIN_EXTSN_C(pselect)
#else
#  if defined(__LP64__) && !__DARWIN_NON_CANCELABLE
		__DARWIN_1050(pselect)
#  else
		__DARWIN_ALIAS_C(pselect)
#  endif
#endif
		;

and <http://www.opensource.apple.com/source/Libc/Libc-498.1.7/include/stdlib.h>
says something like this:

#if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH)
char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath);
#else
char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath);
#endif

which suggests that realpath and pselect have "extended" runtime behavior if
_DARWIN_C_SOURCE is defined.

My guess is that these runtime differences are in the same spirit
as _GNU_SOURCE, i.e., they enable desirable changes that POSIX
would otherwise prohibit.  If so, the patch should be kept.
But if these changes are undesirable, the patch should be backed out.




This bug report was last modified 6 years and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.