diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-09-01 15:41:45 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-09-01 16:32:53 -0700 |
commit | e1e842053e2a573d132bd44439534e20ce00d23b (patch) | |
tree | c4cecb162fe23a41ebb75602cb320099f0f18f68 /m4 | |
parent | 3866ef6158c1ddfe4927e1f88886189ad7a50752 (diff) | |
download | gnulib-e1e842053e2a573d132bd44439534e20ce00d23b.tar.gz |
glob: use scratch_buffer instead of extend_alloca
Much of the lib/glob.c part of this patch comes from a glibc patch
proposed by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
* lib/glob.c: Do not include <config.h>, since <libc-config.h>,
included via glob.h, does this for us now.
(__set_errno): Remove, as libc-config does this for us now.
Include <scratch_buffer.h>.
(GETPW_R_SIZE_MAX): Remove.
(glob): Use struct scratch_buffer instead of extend_alloca.
* lib/glob.in.h: Include libc-config.h rather than
including <sys/cdefs.h> conditionally.
(__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
(__glibc_unlikely, __restrict, weak_alias):
Remove, as libc-config does this for us now.
* m4/glob.m4 (gl_PREREQ_GLOB):
Remove sys/cdefs.h tests; no longer needed.
* modules/glob (Depends-on): Add libc-config, scratch_buffer.
(glob.h): Do not replace HAVE_SYS_CDEFS_H.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/glob.m4 | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/m4/glob.m4 b/m4/glob.m4 index 189cd3a18f..d64e70de40 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 15 +# glob.m4 serial 16 dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -65,12 +65,6 @@ AC_DEFUN([gl_PREREQ_GLOB], AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl AC_REQUIRE([AC_C_RESTRICT])dnl AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])dnl - AC_CHECK_HEADERS_ONCE([sys/cdefs.h unistd.h])dnl - if test $ac_cv_header_sys_cdefs_h = yes; then - HAVE_SYS_CDEFS_H=1 - else - HAVE_SYS_CDEFS_H=0 - fi - AC_SUBST([HAVE_SYS_CDEFS_H]) + AC_CHECK_HEADERS_ONCE([unistd.h])dnl AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r])dnl ]) |