Merge from coreutils.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Aug 2003 08:57:49 +0000 (08:57 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Aug 2003 08:57:49 +0000 (08:57 +0000)
lib/ChangeLog
lib/acl.c
lib/alloca.c
lib/alloca_.h
lib/regex.h

index faad35a..e2bf3a8 100644 (file)
@@ -1,3 +1,14 @@
+2003-08-09  Paul Eggert  <eggert@twinsun.com>
+
+       Merge some files from coreutils.  These changes were
+       originally made by Jim Meyering.
+       * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
+       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  <eggert@twinsun.com>
 
        * bumpalloc.h: Remove.
index 74639cc..45f58be 100644 (file)
--- 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 <config.h>
 #endif
 
+#include <sys/types.h>
 #include <sys/stat.h>
 #ifndef S_ISLNK
 # define S_ISLNK(Mode) 0
index fd95a34..f4c364a 100644 (file)
@@ -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.  */
        }
index 86aa0a5..8ed34fd 100644 (file)
@@ -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.
        request, the program just crashes.
  */
 
-#ifdef __GNUC__
-# ifndef alloca
-#  define alloca __builtin_alloca
-# endif
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
+# ifdef __GNUC__
+#  ifndef alloca
+#   define alloca __builtin_alloca
+#  endif
 # else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
+#  ifdef _MSC_VER
+#   include <malloc.h>
+#   define alloca _alloca
 #  else
-#   ifdef _AIX
- #pragma alloca
+#   if HAVE_ALLOCA_H
+#    include <alloca.h>
 #   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 */
index 07ba1d0..53bdd8f 100644 (file)
@@ -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)