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: Bug-gnulib <bug-gnulib <at> gnu.org>
Cc: 9141 <at> debbugs.gnu.org
Subject: bug#9141: [PATCH 1/3] extensions: Enable extensions on MacOS X 10.5 and later.
Date: Fri, 22 Jul 2011 10:18:12 -0700
Recent versions of MacOS seem to have a _DARWIN_C_SOURCE flag that
has roughly the same role that _GNU_SOURCE has for GNU systems.
I pushed the following patch into gnulib, under the theory that it is
more in the line with the usual Autoconf / gnulib philosophy,
and it may fix some porting issues.

Herb, can you please try configuring coreutils with this change?
If you don't have all the autotools installed, you can simply append
"#define _DARWIN_C_SOURCE 1" to lib/config.h after running "configure".
Thanks.

* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _DARWIN_C_SOURCE.
---
 ChangeLog        |    5 +++++
 m4/extensions.m4 |    7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b22ea11..46d8d04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-22  Paul Eggert  <eggert <at> cs.ucla.edu>
+
+	extensions: Enable extensions on MacOS X 10.5 and later.
+	* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _DARWIN_C_SOURCE.
+
 2011-07-22  Kamil Dudka  <kdudka <at> redhat.com>
 
 	file-has-acl: use acl_extended_file_nofollow if available
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 1330503..22156e0 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 9  -*- Autoconf -*-
+# serial 10  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
@@ -67,6 +67,10 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on MacOS X.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
@@ -95,6 +99,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   test $ac_cv_safe_to_define___extensions__ = yes &&
     AC_DEFINE([__EXTENSIONS__])
   AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([_TANDEM_SOURCE])
-- 
1.7.4.4






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.