summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-09-05 22:57:29 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-09-05 22:57:29 +0000
commit2daf7bfa36f4f44692330e1102ebe004198bbc0f (patch)
tree76b8207f43af34c90cc5be0099b845e2cf9e4263 /lib
parenta204b37fb2d871df551d9bf6fb722d8f269a0754 (diff)
downloaddiffutils-2daf7bfa36f4f44692330e1102ebe004198bbc0f.tar.gz
Modernize bootstrap procedure to match current gnulib.
* bootstrap: Sync with coreutils bootstrap, except check that the directory build-aux exists before trying to copy to it. * bootstrap.conf: New file. (gnulib_modules): Add config-h, dup2, extensions, fcntl, fdl, stat-macros, unistd. * configure.ac: Invoke gl_EARLY and gl_INIT rather than GNULIB_AUTOCONF_SNIPPET. (AC_CONFIG_HEADER): Rename config.h to lib/config.h. (AC_CHECK_HEADERS_ONCE): Don't check for fcntl.h, locale.h, sys/file.h, unistd.h. We now use the fcntl and unistd modules, and locale.h can be assumed for any C89 compiler. (DIFFUTILS_PREREQUISITES): Remove. No longer needed now that we use the stdint module. (AC_CHECK_FUNCS_ONCE): Remove dup2, which is no longer needed now that we use the dup2 module. (AM_GNU_GETTEXT): Use need-formatstring-macros, and ... (AM_GNU_GETTEXT_VERSION): specify version 0.15 instead of 0.14.5, to be consistent with coreutils. * lib/Makefile.am (noinst_LIBRARIES): (lib_SOURCES, libdiffutils_a_LIBADD): (libdiffutils_a_DEPENDENCIES, BUILT_SOURCES, EXTRA_DIST): (MOSTLYCLEANFILES): Remove; now computed automatically. (noinst_HEADERS, libdiffutils_a_SOURCES): Just append our special files now. * lib/cmpbuf.c: Include config.h unconditionally, since we no longer define HAVE_CONFIG_H. * lib/prepargs.c: Likewise. * src/Makefile.am (LDADD): Use $(LIBINTL), not @LIBINTL@. (diff_LDADD): Use $(LIB_CLOCK_GETTIME), not @LIB_CLOCK_GETTIME@. * src/dir.c (dir_read): Use _D_EXACT_NAMLEN, not NAMELEN. * src/system.h (volatile): Remove, since we assume C89 or better. Include stat-macros.h. (S_IRWXU, S_IRWXG, S_IRWXO, S_IRUSR, S_IWUSR): Remove, since we now use stat-macros.h. (SEEK_SET, SEEK_CUR): Remove, since we assume C89 or better. Include unistd.h unconditionally, since we use unistd. Likewise for fcntl.h. (dup2): Remove, since we now use dup2. (O_RDONLY, O_RWDR, O_BINARY): Remove, since we now use fcntl. Include dirent.h unconditionally. (NAMLEN): Remove, replacing with.... (_D_EXACT_NAMLEN): New macro. Include inttypes.h unconditionally. (PTRDIFF_MAX, SIZE_MAX, UINTMAX_MAX, strtoumax): Remove, since we now use inttypes. Include locale.h unconditionally. (setlocale): Remove, since we now assume locale.h.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am17
-rw-r--r--lib/cmpbuf.c4
-rw-r--r--lib/prepargs.c8
3 files changed, 8 insertions, 21 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 565f28d..01db680 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -17,18 +17,7 @@
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
-noinst_LIBRARIES = libdiffutils.a
-
-noinst_HEADERS = cmpbuf.h prepargs.h
-
-libdiffutils_a_SOURCES = $(lib_SOURCES)
-lib_SOURCES = cmpbuf.c prepargs.c
-
-libdiffutils_a_LIBADD = @ALLOCA@ @LIBOBJS@
-libdiffutils_a_DEPENDENCIES = $(libdiffutils_a_LIBADD)
-
-BUILT_SOURCES =
-EXTRA_DIST =
-MOSTLYCLEANFILES =
-
include gnulib.mk
+
+noinst_HEADERS += cmpbuf.h prepargs.h
+libdiffutils_a_SOURCES += cmpbuf.c prepargs.c
diff --git a/lib/cmpbuf.c b/lib/cmpbuf.c
index aa110d2..01ae52f 100644
--- a/lib/cmpbuf.c
+++ b/lib/cmpbuf.c
@@ -18,9 +18,7 @@
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <errno.h>
#include <limits.h>
diff --git a/lib/prepargs.c b/lib/prepargs.c
index 34c2856..f788929 100644
--- a/lib/prepargs.c
+++ b/lib/prepargs.c
@@ -1,6 +1,7 @@
/* Parse arguments from a string and prepend them to an argv.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2006 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +20,8 @@
/* Written by Paul Eggert <eggert@twinsun.com>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
+
#include "prepargs.h"
#include <string.h>
#include <sys/types.h>