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


Message #23 received at 9141 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Herb Wartens <hawartens <at> gmail.com>
Cc: 9141 <at> debbugs.gnu.org, Bug-gnulib <bug-gnulib <at> gnu.org>
Subject: Re: bug#9141: Coreutils Compiler Warnings on OSX 10.7 (Lion)
Date: Fri, 22 Jul 2011 13:47:18 -0700
On 07/21/11 16:00, Herb Wartens wrote:
> I am still seeing the fdatasync
> warnings though.

I just pushed this patch, which should fix things.
Please let me know if it doesn't.  Looking around the net,
it appears that the fdatasync of Mac OS 10.7 is not effective,
so it's better to be safe here and act as if it doesn't exist.


From 339613b6bdd8d4a51435cba9e903b8b5bb082da4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Fri, 22 Jul 2011 13:40:03 -0700
Subject: [PATCH] dd, shred: use fdatasync only if declared

* m4/jm-macros.m4 (coreutils_MACROS): Use fdatasync only if declared.
MacOS X 10.7 has an fdatasync that is not declared, and is rumored to
be ineffective.  (Bug#9141)
---
 m4/jm-macros.m4 |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 6e97221..58b000d 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -93,14 +93,20 @@ AC_DEFUN([coreutils_MACROS],
   cu_PREREQ_STAT_PROG
 
   # for dd.c and shred.c
-  coreutils_saved_libs=$LIBS
-    LIB_FDATASYNC=
+  #
+  # Use fdatasync only if declared.  On MacOS X 10.7, fdatasync exists but
+  # is not declared, and is ineffective.
+  LIB_FDATASYNC=
+  AC_SUBST([LIB_FDATASYNC])
+  AC_CHECK_DECLS_ONCE([fdatasync])
+  if test $ac_cv_have_decl_fdatasync = yes; then
+    coreutils_saved_libs=$LIBS
     AC_SEARCH_LIBS([fdatasync], [rt posix4],
                    [test "$ac_cv_search_fdatasync" = "none required" ||
                     LIB_FDATASYNC=$ac_cv_search_fdatasync])
-    AC_SUBST([LIB_FDATASYNC])
     AC_CHECK_FUNCS([fdatasync])
-  LIBS=$coreutils_saved_libs
+    LIBS=$coreutils_saved_libs
+  fi
 
   # Check whether libcap is usable -- for ls --color support
   LIB_CAP=
-- 
1.7.4.4





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

Previous Next


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