]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fri Jan 12 13:40:01 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-960113
authorRoland McGrath <roland@gnu.org>
Sat, 13 Jan 1996 00:46:48 +0000 (00:46 +0000)
committerRoland McGrath <roland@gnu.org>
Sat, 13 Jan 1996 00:46:48 +0000 (00:46 +0000)
* posix/gnu/types.h: Moved to sysdeps/generic/gnu/types.h.

* posix/glob.c (glob): Add parens in glob call flags arg for
GLOB_BRACE case.

* string/string.h (strdupa): New macro.

* stdio-common/vfscanf.c (%[): Grok ] as first char in set, not
terminator on empty set.  From drepper.

ChangeLog
gnu/types.h [deleted file]
posix/glob.c
stdio-common/vfscanf.c
string/string.h
sysdeps/generic/gnu/types.h [moved from posix/gnu/types.h with 100% similarity]

index ab1bec38e0614acddb64e32f8cd90ed6194a460f..63d6e189735f70c4235b4734414b0d4456777ed4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Fri Jan 12 13:40:01 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * posix/gnu/types.h: Moved to sysdeps/generic/gnu/types.h.
+
+       * posix/glob.c (glob): Add parens in glob call flags arg for
+       GLOB_BRACE case.
+
+       * string/string.h (strdupa): New macro.
+
+       * stdio-common/vfscanf.c (%[): Grok ] as first char in set, not
+       terminator on empty set.  From drepper.
+
 Thu Jan 11 13:09:20 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
        * elf/do-rel.h (elf_dynamic_do_rel): Use referring symbol as
diff --git a/gnu/types.h b/gnu/types.h
deleted file mode 100644 (file)
index 0d1fb31..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <posix/gnu/types.h>
index 954960cb182b65d2784b20ad0d81047a7c0ca84c..259ac020d2459b76ddbd686f2fd882546b937856 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public License as
@@ -290,7 +290,7 @@ glob (pattern, flags, errfunc, pglob)
                  memcpy (buf, pattern, begin - pattern);
                  memcpy (buf + (begin - pattern), p, comma - p);
                  memcpy (buf + (begin - pattern) + (comma - p), end, restlen);
-                 result = glob (buf, (flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC) |
+                 result = glob (buf, ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) |
                                       GLOB_APPEND), errfunc, pglob);
                  if (result && result != GLOB_NOMATCH)
                    return result;
index 14aa7d9748fd1363782371590eee2b18d927f64b..c13627aac21c915b91e6b2cbb655d86b4b022ccc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -703,6 +703,11 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
          else
            not_in = 0;
 
+         if (*f == ']')
+           /* If ] appears before any char in the set, it is not
+              the terminator, but the first char in the set.  */
+           ADDW (*f++);
+
          while ((fc = *f++) != '\0' && fc != ']')
            {
              if (fc == '-' && *f != '\0' && *f != ']' &&
index 0f995319bb672283833db7d9a496590c2cebeb27..95dcba0041d7b2f3fbf3f53de4dd86afabf8bb19 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -91,6 +91,16 @@ extern size_t strxfrm __P ((char *__dest, __const char *__src, size_t __n));
 extern char *strdup __P ((__const char *__s));
 #endif
 
+#if defined (__USE_GNU) && defined (__GNUC__)
+/* Duplicate S, returning an identical alloca'd string.  */
+#define strdupa(s)                                                           \
+({                                                                           \
+    const char *__old = (s);                                                 \
+    size_t __len = strlen (__old) + 1;                                       \
+    memcpy (__builtin_alloca (__len), __old, __len);                         \
+})
+#endif
+
 /* Find the first occurrence of C in S.  */
 extern char *strchr __P ((__const char *__s, int __c));
 /* Find the last occurrence of C in S.  */