view modules/glob @ 18309:1f2a9dbf773c

glob: merge glibc changes into lib/glob.c * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c, dated 2016-05-04 12:09:35 2016 +0200. Here are the changes: 2016-05-04 CVE-2016-1234: glob: Do not copy d_name field of struct dirent [BZ #19779] 2016-04-29 glob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir 2015-10-20 Convert miscellaneous function definitions to prototype style 2015-10-20 Convert 113 more function definitions to prototype style (files with assertions) 2015-06-12 Fix getlogin_r namespace (bug 18527). 2014-02-10 Use glibc_likely instead __builtin_expect. 2013-10-20 When glob pattern contains a trailing slash match only directories. Fixes bug 10278. 2013-09-04 glob: silence -Wattribute warnings 2013-06-07 Avoid use of "register" as optimization hint. 2012-09-25 Use size_t instead of int for internal variables in glob (bug 14621) 2011-07-20 Check for overflows in expressions 2011-05-28 Remove unused variable 2011-05-22 Add a few more alloca size checks 2010-03-27 Whitespace fixes 2010-03-27 Fix one more issue with the glob patch 2010-03-24 Fix glob with empty pattern 2008-05-27 Remove useless more "if" tests before "free" * modules/glob (Depends-on): Add stdint.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 04 May 2016 09:57:48 -0700
parents 578b354d30fc
children 4434607ac1ce
line wrap: on
line source

Description:
glob() function: Search for files and directories with paths matching a
pattern, with GNU extensions.

Files:
lib/glob.in.h
lib/glob-libc.h
lib/glob.c
m4/glob.m4

Depends-on:
extensions
largefile
snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
alloca          [test -n "$GLOB_H"]
closedir        [test -n "$GLOB_H"]
d-type          [test -n "$GLOB_H"]
dirfd           [test -n "$GLOB_H"]
fnmatch         [test -n "$GLOB_H"]
getlogin_r      [test -n "$GLOB_H"]
memchr          [test -n "$GLOB_H"]
mempcpy         [test -n "$GLOB_H"]
opendir         [test -n "$GLOB_H"]
readdir         [test -n "$GLOB_H"]
stdbool         [test -n "$GLOB_H"]
stdint          [test -n "$GLOB_H"]
strdup          [test -n "$GLOB_H"]
sys_stat        [test -n "$GLOB_H"]
unistd          [test -n "$GLOB_H"]
malloc-posix    [test -n "$GLOB_H"]

configure.ac:
gl_GLOB
if test -n "$GLOB_H"; then
  AC_LIBOBJ([glob])
  gl_PREREQ_GLOB
fi

Makefile.am:
BUILT_SOURCES += $(GLOB_H)

# We need the following in order to create <glob.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_GLOB_H
glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
	$(AM_V_GEN)rm -f $@-t $@ && \
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
	  sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
	      < $(srcdir)/glob.in.h; \
	} > $@-t && \
	mv -f $@-t $@
else
glob.h: $(top_builddir)/config.status
	rm -f $@
endif
MOSTLYCLEANFILES += glob.h glob.h-t

Include:
<glob.h>

License:
LGPLv2+

Maintainer:
all, glibc