changeset 17289:e03debf767a4

largefile: port better to Mac OS X 10.5 This patch is backported from Autoconf git. * m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems with ino_t size being different for configuration time versus build/run time. Problem reported by PHO in <http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00040.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 16 Jan 2013 09:35:20 -0800
parents e1bf1347de53
children 44c34bc536ac
files ChangeLog m4/largefile.m4
diffstat 2 files changed, 20 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	largefile: port better to Mac OS X 10.5
+	This patch is backported from Autoconf git.
+	* m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
+	AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
+	with ino_t size being different for configuration time versus
+	build/run time.  Problem reported by PHO in
+	<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00040.html>.
+
 2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>
 
 	doc: clarify -Werror
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -5,9 +5,10 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# The following implementation works around a problem in autoconf <= 2.68;
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
-m4_version_prereq([2.69], [] ,[
+# The following implementation works around a problem in autoconf <= 2.70;
+# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# or configures them incorrectly in some cases.
+m4_version_prereq([2.70], [] ,[
 
 # _AC_SYS_LARGEFILE_TEST_INCLUDES
 # -------------------------------
@@ -25,9 +26,9 @@
 
 
 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-#				CACHE-VAR,
-#				DESCRIPTION,
-#				PROLOGUE, [FUNCTION-BODY])
+#                               CACHE-VAR,
+#                               DESCRIPTION,
+#                               PROLOGUE, [FUNCTION-BODY])
 # --------------------------------------------------------
 m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
 [AC_CACHE_CHECK([for $1 value needed for large files], [$3],
@@ -93,15 +94,11 @@
       [_AC_SYS_LARGEFILE_TEST_INCLUDES])
   fi
 
-  AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
-[/* Enable large inode numbers on Mac OS X.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif])
+  AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
+    [Enable large inode numbers on Mac OS X 10.5.])
 fi
 ])# AC_SYS_LARGEFILE
-
-])# m4_version_prereq 2.69
+])# m4_version_prereq 2.70
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
 # system headers.