diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-11-26 18:46:27 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2009-11-26 18:47:56 +0100 |
commit | 9b5e7d42e0abd88bb6c01a145f5171bc0fb7d84c (patch) | |
tree | 3f5b5e7268933df4abe2462ec16adac486120866 /lib | |
parent | 589387d19f6e4179d6675b7585ffa5455d079582 (diff) | |
download | grep-9b5e7d42e0abd88bb6c01a145f5171bc0fb7d84c.tar.gz |
replace AC_CHECK_* with gnulib modules
* bootstrap.conf: Add gnulib modules for replacement functions and
headers.
* configure.ac: Remove macros subsumed by gnulib.
* lib/hard-locale.c: Remove guards for headers/functions provided by gnulib.
* lib/regex.c: Likewise.
* lib/savedir.c: Likewise.
* src/dfa.c: Likewise.
* src/dfa.h: Do not look at PROTOTYPES.
* src/grep.c: Likewise.
* src/mbsupport.h: Likewise.
* src/system.h: Likewise.
* m4/mbstate_t.m4: Remove.
* src/getpagesize.h: Remove.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/.gitignore | 13 | ||||
-rw-r--r-- | lib/hard-locale.c | 34 | ||||
-rw-r--r-- | lib/regex.c | 2 | ||||
-rw-r--r-- | lib/savedir.c | 39 |
4 files changed, 23 insertions, 65 deletions
diff --git a/lib/.gitignore b/lib/.gitignore index 1015ec80..952e3dff 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -4,6 +4,8 @@ alloca.in.h atexit.c btowc.c config.charset +dirent.h +dirent.in.h dummy.c errno.h errno.in.h @@ -20,6 +22,7 @@ getopt.h getopt.in.h getopt1.c getopt_int.h +getpagesize.c gettext.h gnulib.mk intprops.h @@ -27,13 +30,18 @@ inttypes.h inttypes.in.h localcharset.c localcharset.h +locale.h +locale.in.h malloc.c +mbrlen.c mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c memchr.valgrind +memmove.c +mempcpy.c obstack.c obstack.h quotearg.c @@ -69,6 +77,11 @@ strtol.c strtoll.c strtoul.c strtoull.c +sys +sys_stat.h +sys_stat.in.h +time.h +time.in.h unistd.h unistd.in.h verify.h diff --git a/lib/hard-locale.c b/lib/hard-locale.c index 79822e7e..eef13f84 100644 --- a/lib/hard-locale.c +++ b/lib/hard-locale.c @@ -15,36 +15,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#ifndef __GNUC__ -# ifdef HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX - # pragma alloca -# else -# ifdef _WIN32 -# include <malloc.h> -# include <io.h> -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -#if HAVE_LOCALE_H -# include <locale.h> -#endif - -#if HAVE_STRING_H -# include <string.h> -#endif +#include <config.h> +#include <alloca.h> +#include <locale.h> +#include <string.h> /* Return nonzero if the current CATEGORY locale is hard, i.e. if you can't get away with assuming traditional C or POSIX behavior. */ diff --git a/lib/regex.c b/lib/regex.c index fb7df666..6ad5c539 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -46,7 +46,7 @@ # include <sys/types.h> #endif -#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) +#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H) /* For platform which support the ISO C amendement 1 functionality we support user defined character classes. */ diff --git a/lib/savedir.c b/lib/savedir.c index 9c46b66e..a7e02e8b 100644 --- a/lib/savedir.c +++ b/lib/savedir.c @@ -23,25 +23,9 @@ #endif #include <sys/types.h> - -#if HAVE_UNISTD_H -# include <unistd.h> -#endif - -#if HAVE_DIRENT_H -# include <dirent.h> -#else -# define dirent direct -# if HAVE_SYS_NDIR_H -# include <sys/ndir.h> -# endif -# if HAVE_SYS_DIR_H -# include <sys/dir.h> -# endif -# if HAVE_NDIR_H -# include <ndir.h> -# endif -#endif +#include <unistd.h> +#include <dirent.h> +#include <stddef.h> #ifdef CLOSEDIR_VOID /* Fake a return value. */ @@ -50,21 +34,8 @@ # define CLOSEDIR(d) closedir (d) #endif -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <string.h> -#else -char *malloc (); -char *realloc (); -#endif -#ifndef NULL -# define NULL 0 -#endif - -#ifndef stpcpy -char *stpcpy (); -#endif - +#include <stdlib.h> +#include <string.h> #include <fnmatch.h> #include "savedir.h" |