From 202b2af44ddec65b9746b8d2d0643cf862351d23 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 9 Aug 2003 08:57:49 +0000 Subject: [PATCH] Merge from coreutils. --- lib/ChangeLog | 11 +++++++++++ lib/acl.c | 3 ++- lib/alloca.c | 2 +- lib/alloca_.h | 44 ++++++++++++++++++++++---------------------- lib/regex.h | 2 +- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index faad35ad1..e2bf3a88c 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,14 @@ +2003-08-09 Paul Eggert + + Merge some files from coreutils. These changes were + originally made by Jim Meyering. + * lib/acl.c: Include before ; + many older Unixes require this. + * lib/alloca.c (alloca): Remove cast to argument of free; + no longer needed in C89. + * lib/alloca_.h, lib/regex.h: Fix white space to match + what GNU indent does. + 2003-08-05 Paul Eggert * bumpalloc.h: Remove. diff --git a/lib/acl.c b/lib/acl.c index 74639cc0b..45f58be42 100644 --- a/lib/acl.c +++ b/lib/acl.c @@ -1,6 +1,6 @@ /* acl.c - access control lists - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 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 @@ -22,6 +22,7 @@ # include #endif +#include #include #ifndef S_ISLNK # define S_ISLNK(Mode) 0 diff --git a/lib/alloca.c b/lib/alloca.c index fd95a34d6..f4c364a72 100644 --- a/lib/alloca.c +++ b/lib/alloca.c @@ -193,7 +193,7 @@ alloca (size) { register header *np = hp->h.next; - free ((pointer) hp); /* Collect garbage. */ + free (hp); /* Collect garbage. */ hp = np; /* -> next header. */ } diff --git a/lib/alloca_.h b/lib/alloca_.h index 86aa0a558..8ed34fdc6 100644 --- a/lib/alloca_.h +++ b/lib/alloca_.h @@ -21,7 +21,7 @@ "config.h", not later. */ #ifndef _ALLOCA_H -#define _ALLOCA_H +# define _ALLOCA_H /* alloca(N) returns a pointer (void* or char*) to N bytes of memory allocated on the stack, and which will last until the function returns. @@ -34,35 +34,35 @@ request, the program just crashes. */ -#ifdef __GNUC__ -# ifndef alloca -# define alloca __builtin_alloca -# endif -#else -# ifdef _MSC_VER -# include -# define alloca _alloca +# ifdef __GNUC__ +# ifndef alloca +# define alloca __builtin_alloca +# endif # else -# if HAVE_ALLOCA_H -# include +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# if HAVE_ALLOCA_H +# include # else -# ifdef __hpux /* This section must match that of bison generated files. */ -# ifdef __cplusplus +# ifdef _AIX + # pragma alloca +# else +# ifdef __hpux /* This section must match that of bison generated files. */ +# ifdef __cplusplus extern "C" void *alloca (unsigned int); -# else /* not __cplusplus */ +# else /* not __cplusplus */ extern void *alloca (); -# endif /* not __cplusplus */ -# else /* not __hpux */ -# ifndef alloca +# endif /* not __cplusplus */ +# else /* not __hpux */ +# ifndef alloca extern char *alloca (); -# endif -# endif /* __hpux */ +# endif +# endif /* __hpux */ +# endif # endif # endif # endif -#endif #endif /* _ALLOCA_H */ diff --git a/lib/regex.h b/lib/regex.h index 07ba1d02d..53bdd8ff4 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -193,7 +193,7 @@ extern reg_syntax_t re_syntax_options; & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) -#define RE_SYNTAX_POSIX_AWK \ +#define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS) -- 2.11.0