1. 23 Aug, 2017 1 commit
    • Paul Eggert's avatar
      glob: merge from glibc with Zanella glob changes · 32107c10
      Paul Eggert authored
      Merge glob from glibc, with changes for glob proposed
      by Adhemerval Zanella in the thread starting here:
      plus some fixes for this merge.
      * lib/flexmember.h: Change license wording to something that
      works unchanged in Glibc, since this code might be used in
      Glibc and this will minimize 'diff' output.
      * lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
      New files, ported from glibc.
      * lib/glob_pattern_p.c, lib/globfree.c, lib/glob.c [!_LIBC]:
      Include <config.h> first.
      * lib/glob-libc.h (_Restrict_): Remove.  All uses replaced
      with __restrict.
      (__size_t): Remove.  All uses replaced by size_t.
      (size_t): Define by defining __need_size_t and including <stddef.h>.
      This should work even in non-glibc platforms, where any name
      pollution is OK.
      Use __USE_MISC instead of __USE_BSD || __USE_GNU.
      (struct stat64): Don’t worry about __GLOB_GNULIB.
      (glob, globfree, glob_pattern_p): Remove macros for
      __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
      case.  Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
      but set errno.
      * lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove.  All uses
      removed since the glibc behavior works on null pointers.
      Do not include stdio.h; old SunOS is irrelevant now.
      Do not worry about GLOB_ONLY_P as we now mimic glibc here.
      Include glob_internal.h.
      (D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
      ((POSIX || WINDOWS32) && !__GNU_LIBRARY__).  The latter probably
      worked only coincidentally.
      (attribute_hidden, __attribute_noinline__, __glibc_unlikely):
      Remove macros; now done in glob.in.h.
      (size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
      (glob): Properly initialize glob structure with
      GLOB_BRACE|GLOB_DOOFFS (bug 20707).
      Remove old code using SHELL since Bash no longer
      uses this.
      (glob, prefix_array): Separate MS code better.
      (glob, glob_in_dir): Use C99 decls before statements when glibc
      (glob_in_dir): Remove old Amiga and VMS code.
      (globfree, __glob_pattern_type, __glob_pattern_p): Move to
      separate files.
      * lib/glob.in.h (attribute_hidden, __attribute_noinline__)
      Move here from glob.c.
      (__restrict): New macro here, replacing the _Restrict_ in glob.c.
      (weak_alias): New macro.
      (__size_t): Remove.  All uses replaced by size_t.
      * modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
      * modules/flexmember (License): Now LGPLv2+, which it should have
      been anyway since flexmember.h is not unlimited-license.
      * modules/glob (Files): Add +lib/glob_internal.h,
      lib/glob_pattern_p.c, lib/globfree.c.
      (Depends-on): Remove snippet/arg-nonnull.
  2. 07 Sep, 2016 1 commit
    • Paul Eggert's avatar
      flexmember: port better to GCC + valgrind · 4c32543a
      Paul Eggert authored
      With a char[] flexible array member in a struct with nontrivial
      alignment, GCC-generated code can access past the end of the
      array, because GCC assumes there are padding bytes to get the
      struct aligned.  So the common idiom of malloc (offsetof (struct
      s, m), n) does not properly allocate an n-byte trailing member, as
      malloc’s argument should be the next multiple of alignof (struct s).
      See GCC Bug#66661: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
      Although C11 apparently permits this GCC optimization (i.e., there
      was a bug in Gnulib not in GCC), possibly this is a defect in C11.
      See the thread containing:
      * lib/flexmember.h: New file.
      * lib/fnmatch.c, lib/fts.c, lib/glob.c, lib/idcache.c:
      * lib/localename.c, lib/time_rz.c:
      Include flexmember.h.
      * lib/fnmatch_loop.c (struct patternlist):
      * lib/localename.c (struct hash_node):
      * lib/fnmatch_loop.c (EXT):
      * lib/fts.c (fts_alloc):
      * lib/glob.c (glob_in_dir):
      * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
      * lib/localename.c (gl_lock_define_initialized):
      * lib/time_rz.c (tzalloc):
      Use FLEXSIZEOF instead of offsetof.
      * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
      Check that the size of the struct can be taken.
      * modules/flexmember (Files): Add lib/flexmember.h.
      * modules/fnmatch, modules/glob, modules/localename (Depends-on):
      Add flexmember.
  3. 24 Jul, 2015 1 commit
  4. 06 Nov, 2006 1 commit
  5. 26 Sep, 2006 1 commit
    • Paul Eggert's avatar
      [ChangeLog] · 2a15b99b
      Paul Eggert authored
      * modules/clock-time (Maintainer): Add self.
      * modules/getlogin_r (Depends-on): Add extensions.
      * host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
  6. 25 Sep, 2006 1 commit
    • Ralf Wildenhues's avatar
      * modules/clock-time: New module. · c90a7886
      Ralf Wildenhues authored
      * modules/nanosleep (Depends-on): Add clock-time.
      * modules/gethrxtime (Depends-on): Likewise.
      * modules/gettime (Depends-on): Likewise.
      * modules/settime (Depends-on): Likewise.
  7. 22 Sep, 2004 1 commit
  8. 06 Aug, 2004 1 commit
  9. 31 Mar, 2004 1 commit
  10. 20 Jan, 2003 1 commit
  11. 13 Jan, 2003 1 commit
  12. 31 Dec, 2002 1 commit