[PATCH:lndir 3/4] Enable AC_SYS_LARGEFILE & AC_USE_SYSTEM_EXTENSIONS

Alan Coopersmith alan.coopersmith at oracle.com
Fri Apr 16 01:29:33 PDT 2010


Avoids stat() failures on 32-bit platforms if a file has a size
that doesn't fit in 32-bits

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac |    6 +++++-
 lndir.c      |    4 ++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1cfb14b..3ec49fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,10 +21,11 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
+AC_PREREQ([2.60])
 AC_INIT(lndir, [1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
+AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros 1.4 or later: XORG_DEFAULT_OPTIONS, INSTALL_CMD
 m4_ifndef([XORG_MACROS_VERSION],
@@ -37,6 +38,9 @@ AM_CONFIG_HEADER(config.h)
 AC_PROG_INSTALL
 AC_PROG_CC
 
+# Avoid stat() failures if a file has a size that doesn't fit in 32-bits
+AC_SYS_LARGEFILE
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XPROTO, xproto)
 AC_SUBST(XPROTO_CFLAGS)
diff --git a/lndir.c b/lndir.c
index 4978f17..0e1c6b8 100644
--- a/lndir.c
+++ b/lndir.c
@@ -45,6 +45,10 @@ in this Software without prior written authorization from The Open Group.
    	%  lndir ../X
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <X11/Xos.h>
 #include <X11/Xfuncproto.h>
 #include <stdio.h>
-- 
1.5.6.5



More information about the xorg-devel mailing list