summaryrefslogtreecommitdiff
path: root/lib/dirent.in.h
Commit message (Collapse)AuthorAgeFilesLines
* fdopendir: Fix fd leak and test failure on native Windows.Bruno Haible2023-04-271-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/dirent-private.h: On mingw, define 'struct gl_directory' as a wrapper around the original DIR. On MSVC, add an 'fd_to_close' field to 'struct gl_directory'. * lib/dirent.in.h (DIR): Define when DIR_HAS_FD_MEMBER is 0, i.e. on both mingw and MSVC. (GNULIB_defined_DIR): New macro. (opendir): Avoid incompatible redeclaration. (readdir): Consider REPLACE_READDIR. (rewinddir): Consider REPLACE_REWINDDIR. * m4/dirent_h.m4 (gl_DIRENT_DIR): New macro. (gl_DIRENT_H): Invoke it. (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_READDIR, REPLACE_REWINDDIR. * modules/dirent (Makefile.am): Substitute DIR_HAS_FD_MEMBER, REPLACE_READDIR, REPLACE_REWINDDIR. -- * lib/dirfd.c (dirfd): If GNULIB_defined_DIR, just use the 'fd_to_close' field. * m4/dirfd.m4 (gl_FUNC_DIRFD): Set HAVE_DIRFD. Don't set REPLACE_DIRFD to 1 if HAVE_DIRFD is 0. If DIR_HAS_FD_MEMBER is 0, ensure dirfd.c gets compiled. * modules/dirfd (Files): Add lib/dirent-private.h. (Depends-on, configure.ac): Simplify conditions. -- * lib/closedir.c: Include <stdlib.h> always, for free(). (closedir): If GNULIB_defined_DIR, arrange to call close(dirfd(dirp)) at the end. On mingw, call free() of dirp. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if HAVE_CLOSEDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure closedir.c gets compiled. -- * lib/opendir.c: Include <stdlib.h> always. Include <string.h>. (opendir): On mingw, allocate the 'struct gl_directory' through malloc. If GNULIB_defined_DIR, set the 'fd_to_close' field to -1. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if HAVE_OPENDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure opendir.c gets compiled. -- * lib/fdopendir.c (fdopendir): If GNULIB_defined_DIR, use a simple implementation based on opendir and the fchdir module. If __KLIBC__, don't define unused auxiliary functions. * modules/fdopendir (Files): Add lib/dirent-private.h. -- * lib/readdir.c (readdir): On mingw, redirect to the original readdir function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/readdir.m4 (gl_FUNC_READDIR): If DIR_HAS_FD_MEMBER is 0, ensure readdir.c gets compiled. * modules/readdir (configure.ac): Consider REPLACE_READDIR. -- * lib/rewinddir.c (rewinddir): On mingw, redirect to the original rewinddir function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/rewinddir.m4 (gl_FUNC_REWINDDIR): If DIR_HAS_FD_MEMBER is 0, ensure rewinddir.c gets compiled. * modules/rewinddir (configure.ac): Consider REPLACE_REWINDDIR. -- * lib/fchdir.c (dir_info_t): Remove a FIXME.
* Adjust comments in <config.h> reminders.Bruno Haible2023-04-131-1/+1
| | | | | * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*. * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
* Add more reminders to include <config.h>.Bruno Haible2023-04-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (gl_COMMON): In config.h, define _GL_CONFIG_H_INCLUDED. * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of _GL_INLINE_HEADER_BEGIN. * lib/alignalloc.h: Likewise. * lib/argp-fmtstream.h: Likewise. * lib/argp.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/c-ctype.h: Likewise. * lib/count-leading-zeros.h: Likewise. * lib/count-one-bits.h: Likewise. * lib/count-trailing-zeros.h: Likewise. * lib/eealloc.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/gethrxtime.h: Likewise. * lib/gl_list.h: Likewise. * lib/gl_map.h: Likewise. * lib/gl_omap.h: Likewise. * lib/gl_openssl.h: Likewise. * lib/gl_oset.h: Likewise. * lib/gl_set.h: Likewise. * lib/gl_xlist.h: Likewise. * lib/gl_xmap.h: Likewise. * lib/gl_xomap.h: Likewise. * lib/gl_xoset.h: Likewise. * lib/gl_xset.h: Likewise. * lib/gl_xsublist.h: Likewise. * lib/glthread/cond.h: Likewise. * lib/hamt.h: Likewise. * lib/ialloc.h: Likewise. * lib/math.in.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * lib/openat.h: Likewise. * lib/pipe-filter-aux.h: Likewise. * lib/priv-set.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/savewd.h: Likewise. * lib/se-context.in.h: Likewise. * lib/se-label.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sig-handler.h: Likewise. * lib/stat-time.h: Likewise. * lib/string-desc-quotearg.h: Likewise. * lib/string-desc.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/timespec.h: Likewise. * lib/u64.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utimens.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xsize.h: Likewise. * lib/xstring-desc.h: Likewise. * lib/xtime.h: Likewise. * lib/acl.h: Check that config.h was already included. * lib/alignof.h: Likewise. * lib/argmatch.h: Likewise. * lib/argv-iter.h: Likewise. * lib/arpa_inet.in.h: Likewise. * lib/attribute.h: Likewise. * lib/backupfile.h: Likewise. * lib/base32.h: Likewise. * lib/base64.h: Likewise. * lib/basename-lgpl.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-snprintf.h: Likewise. * lib/c-stack.h: Likewise. * lib/c-strcase.h: Likewise. * lib/c-vasnprintf.h: Likewise. * lib/c-vasprintf.h: Likewise. * lib/c-vsnprintf.h: Likewise. * lib/c-xvasprintf.h: Likewise. * lib/canon-host.h: Likewise. * lib/canonicalize.h: Likewise. * lib/clean-temp.h: Likewise. * lib/concat-filename.h: Likewise. * lib/ctype.in.h: Likewise. * lib/dfa.h: Likewise. * lib/di-set.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/dirent.in.h: Likewise. * lib/dirname.h: Likewise. * lib/eloop-threshold.h: Likewise. * lib/error.in.h: Likewise. * lib/exclude.h: Likewise. * lib/fatal-signal.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/flexmember.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/fpending.h: Likewise. * lib/freadable.h: Likewise. * lib/freadahead.h: Likewise. * lib/freading.h: Likewise. * lib/fts_.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * lib/gc.h: Likewise. * lib/get_progname_of.h: Likewise. * lib/glob.in.h: Likewise. * lib/glthread/thread.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hash.h: Likewise. * lib/i-ring.h: Likewise. * lib/iconv.in.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/javaversion.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/localename.h: Likewise. * lib/malloc.in.h: Likewise. * lib/malloca.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memchr2.h: Likewise. * lib/memcmp2.h: Likewise. * lib/modechange.h: Likewise. * lib/monetary.in.h: Likewise. * lib/mountlist.h: Likewise. * lib/netdb.in.h: Likewise. * lib/obstack.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/pipe-filter.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readutmp.h: Likewise. * lib/regex-quote.h: Likewise. * lib/relocatable.h: Likewise. * lib/savedir.h: Likewise. * lib/sched.in.h: Likewise. * lib/search.in.h: Likewise. * lib/sh-quote.h: Likewise. * lib/signal.in.h: Likewise. * lib/sigpipe-die.h: Likewise. * lib/sockets.h: Likewise. * lib/spawn.in.h: Likewise. * lib/ssfmalloc.h: Likewise. * lib/stack.h: Likewise. * lib/stdalign.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * lib/strerror-override.h: Likewise. * lib/striconv.h: Likewise. * lib/striconveh.h: Likewise. * lib/striconveha.h: Likewise. * lib/string-buffer.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strnlen1.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/system-quote.h: Likewise. * lib/term-style-control.h: Likewise. * lib/termios.in.h: Likewise. * lib/textstyle.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/trim.h: Likewise. * lib/utime.in.h: Likewise. * lib/utmp.in.h: Likewise. * lib/vasnprintf.h: Likewise. * lib/verror.h: Likewise. * lib/version-etc.h: Likewise. * lib/wchar.in.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/windows-thread.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmalloca.h: Likewise. * lib/xmemdup0.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xstriconv.h: Likewise. * lib/xstriconveh.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtol-error.h: Likewise. * lib/xvasprintf.h: Likewise. * Makefile (config_h_MACROS*): New variables. (sc_check_config_h_reminder): New rule.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Make generated .in.h files as standalone as possible.Bruno Haible2021-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Reported by Jan Engelhardt <jengelh@inai.de>. * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition. * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition. * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition. * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency with the other *.in.h files. * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definition. * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of _GL_UNUSED. (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definitions.
* dirent: Improve GCC 11 allocation-deallocation checking.Bruno Haible2021-08-081-8/+27
| | | | | | | | * lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the platform already declares the function or when the module 'opendir' is not in use. (fdopendir): For GCC >= 11: Declare also when the platform already declares the function or when the module 'fdopendir' is not in use.
* dirent: Improve GCC 11 allocation-deallocation checking.Bruno Haible2021-08-071-28/+38
| | | | | | | | * lib/dirent.in.h (closedir): Move declaration up. (opendir, fdopendir): Declare that that deallocation must happen through 'closedir'. * lib/dirent-safer.h (opendir_safer): Likewise. * lib/opendirat.h (opendirat): Likewise.
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* dirent: Fix compilation error in C++ mode on OS/2 kLIBC.KO Myung-Hun2021-01-191-1/+2
| | | | | * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function always.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Use many __attribute__s with clang.Bruno Haible2020-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (_Noreturn): Use __attribute__ __noreturn__ also on clang. * lib/cdefs.h (__glibc_clang_has_attribute, __glibc_clang_has_builtin): New macros. (__THROW, __THROWNL, __NTH, __NTHNL): Use __attribute__ __nothrow__ also on clang. (__warndecl, __warnattr, __errordecl): Use __attribute__ __diagnose_if__ also on older clang versions. (__attribute__): Don't define to empty on clang. (__attribute_malloc__): Use __attribute__ __malloc__ also on clang. (__attribute_pure__): Use __attribute__ __pure__ also on clang. (__attribute_const__): Use __attribute__ __const__ also on clang. (__attribute_used__): Use __attribute__ __used__ also on clang. (__attribute_noinline__): Use __attribute__ __noinline__ also on clang. (__attribute_deprecated__): Use __attribute__ __deprecated__ also on clang. (__attribute_format_arg__): Use __attribute__ __format_arg__ also on clang. (__attribute_format_strfmon__): Use __attribute__ __format__ __strfmon__ also on clang. (__nonnull): Use __attribute__ __nonnull__ also on clang. (__attribute_warn_unused_result__): Use __attribute__ __warn_unused_result__ also on clang. (__always_inline): Use __attribute__ __always_inline__ also on clang. (__attribute_artificial__): Use __attribute__ __artificial__ also on clang >= 7. (__glibc_unlikely, __glibc_likely): Use __builtin_expect also on older clang versions. (_Noreturn): Don't redefine on clang >= 3.5. * lib/arg-nonnull.h (_GL_ARG_NONNULL): Use __attribute__ __nonnull__ also on clang. * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang. * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Use __attribute__ __format__ also on clang. * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise. * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Likewise. * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST): Use __attribute__ __const__ also on clang. (_UC_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang. * lib/noreturn.h (_GL_NORETURN_FUNC, _GL_NORETURN_FUNCPTR): Use __attribute__ __noreturn__ also on clang. * lib/obstack.h (__attribute_noreturn__): Likewise. * lib/file-set.h (record_file): Use __attribute__ __nonnull__ also on clang. * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ always_inline also on clang. * tests/test-printf-posix.c (func1, func2, func3, func4): Test also on clang.
* dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.Bruno Haible2020-05-091-4/+6
| | | | | | | | * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Don't override the definition that usually comes from m4/gnulib-common.m4. * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBCKO Myung-Hun2016-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * lib/closedir.c (closedir): Unregister fd if closedir() succeeds. * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd): Declare on kLIBC. * lib/dirfd.c (struct dirp_fd_list): New. Structures to keep track of fd associated with dirp. (_gl_register_dirp_fd): New. Register fd associated with dirp to dirp_fd_list. (_gl_unregister_dirp_fd): New. Unregister fd with closing it. (dirfd): Implemented for kLIBC. * lib/fdopendir.c (fdopendir): Implemented for kLIBC. * lib/opendir.c (opendir): New. Register fd and dirp pair if open() succeeds. * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Replace if OS/2. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. (REPLACE_DIRFD): Define to 1 if replaced. * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise. * modules/closedir (Depends-on): Add dirfd. * modules/dirfd (Depends-on): Add 'test $REPLACE_DIRFD = 1' to errno condition. (configure.ac): Add dirfd to LIBOBJS if $REPLACE_DIRFD = 1 as well. * modules/opendir (Depends-on): Add dirfd.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* glob, etc.: port to MSVC v18 on MS-Windows 8.1Paul Eggert2015-02-241-0/+2
| | | | | | | | * lib/dirent--.h (GNULIB_defined_opendir): * lib/dirent.in.h (GNULIB_defined_opendir) (GNULIB_defined_closedir): * lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir): #undef only if Gnulib defined it.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* Enable common subexpression optimization in GCC.Bruno Haible2012-03-251-0/+9
| | | | | | | | | | | | | | * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h. (alphasort): Declare with GCC attribute 'pure'. * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h. (atoll): Declare with GCC attribute 'pure'. * lib/string.in.h (mbslen, mbsnlen, mbschr, mbsrchr, mbsstr, mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk, mbsspn, strverscmp): Declare with GCC attribute 'pure'. * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h. (btowc, wctob, wcwidth, wmemchr, wmemcmp, wcslen, wcsnlen, wcscmp, wcsncmp, wcscasecmp, wcsncasecmp, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcswidth): Declare with GCC attribute 'pure'.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.Bruno Haible2011-09-131-18/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/dirent.in.h (struct dirent): New type. (DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK, DT_WHT): New macros. (DIR): New type. (opendir, closedir): Declare only if the module 'opendir' is enabled. (readdir, rewinddir): New declarations. * lib/dirent-private.h: New file. * lib/opendir.c: New file. * lib/readdir.c: New file. * lib/rewinddir.c: New file. * lib/closedir.c: New file. * lib/fchdir.c (rpl_closedir, rpl_opendir): Remove functions. * m4/opendir.m4: New file. * m4/readdir.m4: New file. * m4/rewinddir.m4: New file. * m4/closedir.m4: New file. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_OPENDIR, REPLACE_CLOSEDIR here. * m4/dirent_h.m4 (gl_DIRENT_H): Also check whether closedir, opendir, readdir, rewinddir are declared. (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_OPENDIR, GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR. * modules/dirent (Makefile.am): Substitute GNULIB_OPENDIR, GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR. * modules/opendir: New file. * modules/readdir: New file. * modules/rewinddir: New file. * modules/closedir: New file. * doc/posix-functions/opendir.texi: Mention the 'opendir' module. * doc/posix-functions/readdir.texi: Mention the 'readdir' module. * doc/posix-functions/rewinddir.texi: Mention the 'rewinddir' module. * doc/posix-functions/closedir.texi: Mention the 'closedir' module. * NEWS: Mention the 'fchdir' change.
* dirent: Don't assume <dirent.h> exists.Bruno Haible2011-09-111-1/+3
| | | | | | | * lib/dirent.in.h: Include <dirent.h> only if HAVE_DIRENT_H is 1. * m4/dirent_h.m4 (gl_DIRENT_H): Set HAVE_DIRENT_H. * modules/dirent (Makefile.am): Substitute HAVE_DIRENT_H. * doc/posix-headers/dirent.texi: Mention the MSVC problem.
* Allow multiple gnulib generated include files to be combined.Bruno Haible2011-05-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnulib-tool (func_compute_include_guard_prefix): New function. (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also ${gl_include_guard_prefix} references. (func_import, func_create_testdir): Invoke func_compute_include_guard_prefix. * lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder. * lib/ctype.in.h: Likewise. * lib/dirent.in.h: Likewise. * lib/errno.in.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/float.in.h: Likewise. * lib/getopt.in.h: Likewise. * lib/iconv.in.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/math.in.h: Likewise. * lib/netdb.in.h: Likewise. * lib/netinet_in.in.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/sched.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/search.in.h: Likewise. * lib/signal.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_uio.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/sysexits.in.h: Likewise. * lib/termios.in.h: Likewise. * lib/time.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/wchar.in.h: Likewise. * lib/wctype.in.h: Likewise. * modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/errno (Makefile.am): Likewise. * modules/fcntl-h (Makefile.am): Likewise. * modules/float (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Likewise. * modules/iconv-h (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/math (Makefile.am): Likewise. * modules/netdb (Makefile.am): Likewise. * modules/netinet_in (Makefile.am): Likewise. * modules/poll-h (Makefile.am): Likewise. * modules/pthread (Makefile.am): Likewise. * modules/pty (Makefile.am): Likewise. * modules/sched (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/selinux-h (Makefile.am): Likewise. * modules/signal (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/stdarg (Makefile.am): Likewise. * modules/stddef (Makefile.am): Likewise. * modules/stdint (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/strings (Makefile.am): Likewise. * modules/sys_file (Makefile.am): Likewise. * modules/sys_ioctl (Makefile.am): Likewise. * modules/sys_select (Makefile.am): Likewise. * modules/sys_socket (Makefile.am): Likewise. * modules/sys_stat (Makefile.am): Likewise. * modules/sys_time (Makefile.am): Likewise. * modules/sys_times (Makefile.am): Likewise. * modules/sys_uio (Makefile.am): Likewise. * modules/sys_utsname (Makefile.am): Likewise. * modules/sys_wait (Makefile.am): Likewise. * modules/sysexits (Makefile.am): Likewise. * modules/termios (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * modules/wctype-h (Makefile.am): Likewise. * modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* Avoid line length limitation from HP NonStop system header files.Bruno Haible2010-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS. * lib/arpa_inet.in.h: Use PRAGMA_COLUMNS. * lib/ctype.in.h: Likewise. * lib/dirent.in.h: Likewise. * lib/errno.in.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/float.in.h: Likewise. * lib/getopt.in.h: Likewise. * lib/iconv.in.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/math.in.h: Likewise. * lib/netdb.in.h: Likewise. * lib/netinet_in.in.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/sched.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/search.in.h: Likewise. * lib/signal.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/sysexits.in.h: Likewise. * lib/termios.in.h: Likewise. * lib/time.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/wchar.in.h: Likewise. * lib/wctype.in.h: Likewise. * modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/errno (Makefile.am): Likewise. * modules/fcntl-h (Makefile.am): Likewise. * modules/float (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Likewise. * modules/iconv-h (Makefile.am): Likewise. * modules/inttypes (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/math (Makefile.am): Likewise. * modules/netdb (Makefile.am): Likewise. * modules/netinet_in (Makefile.am): Likewise. * modules/poll-h (Makefile.am): Likewise. * modules/pthread (Makefile.am): Likewise. * modules/pty (Makefile.am): Likewise. * modules/sched (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/selinux-h (Makefile.am): Likewise. * modules/signal (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/stdarg (Makefile.am): Likewise. * modules/stddef (Makefile.am): Likewise. * modules/stdint (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/strings (Makefile.am): Likewise. * modules/sys_file (Makefile.am): Likewise. * modules/sys_ioctl (Makefile.am): Likewise. * modules/sys_select (Makefile.am): Likewise. * modules/sys_socket (Makefile.am): Likewise. * modules/sys_stat (Makefile.am): Likewise. * modules/sys_time (Makefile.am): Likewise. * modules/sys_times (Makefile.am): Likewise. * modules/sys_utsname (Makefile.am): Likewise. * modules/sys_wait (Makefile.am): Likewise. * modules/sysexits (Makefile.am): Likewise. * modules/termios (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * modules/wctype (Makefile.am): Likewise.
* dirfd: Fix compilation error in C++ mode on MacOS X, *BSD, IRIX.Bruno Haible2010-09-041-0/+6
| | | | | | * lib/dirent.in.h (dirfd): In C++ mode with GNULIB_NAMESPACE, turn the macro into a function. Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
* dirfd: Avoid link error on AIX 7.1.Bruno Haible2010-07-311-2/+13
|
* fdopendir: work around FreeBSD bugEric Blake2010-03-301-1/+1
| | | | | | | | | | | | | | | | Without a declaration, at least tar would core dump on 64-bit FreeBSD because gcc only used 32 bits of the resulting pointer. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it. * modules/dirent (Makefile.am): Substitute it. * lib/dirent.in.h (fdopendir): Supply missing FreeBSD declaration. * doc/posix-functions/fdopendir.texi (fdopendir): Document the fix. Reported by Christian Weisgerber <naddy@mips.inka.de>. Signed-off-by: Eric Blake <eblake@redhat.com>
* Emit #pragma system_header after the inclusion guard, not before.Bruno Haible2010-03-301-2/+2
|
* maint: use pragma consistently across replacement headersEric Blake2010-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several headers set #pragma GCC system_header prior to checking any multiple inclusion guards; maintenance is easiest if all replacement headers follow the same paradigm. * lib/ctype.in.h (system_header): Hoist for consistent placement. * lib/dirent.in.h (system_header): Likewise. * lib/errno.in.h (system_header): Likewise. * lib/float.in.h (system_header): Likewise. * lib/getopt.in.h (system_header): Likewise. * lib/iconv.in.h (system_header): Likewise. * lib/inttypes.in.h (system_header): Likewise. * lib/langinfo.in.h (system_header): Likewise. * lib/locale.in.h (system_header): Likewise. * lib/math.in.h (system_header): Likewise. * lib/netdb.in.h (system_header): Likewise. * lib/netinet_in.in.h (system_header): Likewise. * lib/pty.in.h (system_header): Likewise. * lib/sched.in.h (system_header): Likewise. * lib/se-selinux.in.h (system_header): Likewise. * lib/search.in.h (system_header): Likewise. * lib/spawn.in.h (system_header): Likewise. * lib/stdarg.in.h (system_header): Likewise. * lib/stdint.in.h (system_header): Likewise. * lib/string.in.h (system_header): Likewise. * lib/strings.in.h (system_header): Likewise. * lib/sys_file.in.h (system_header): Likewise. * lib/sys_ioctl.in.h (system_header): Likewise. * lib/sys_socket.in.h (system_header): Likewise. * lib/sys_times.in.h (system_header): Likewise. * lib/sys_utsname.in.h (system_header): Likewise. * lib/sys_wait.in.h (system_header): Likewise. * lib/sysexits.in.h (system_header): Likewise. * lib/unistd.in.h (system_header): Likewise. * lib/wctype.in.h (system_header): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* dirent: Avoid #define replacements in C++ mode.Bruno Haible2010-03-081-24/+52
|
* warn-on-use: use instead of link-warningEric Blake2010-01-201-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each *.in.h file serves two purposes - provide enough self-contained content to serve as a replacement for the system header regardless of the user's compiler, and offer the developer the ability to detect any gnulib modules that might have been inadvertantly excluded. The former requires independence from config.h, and routes everything through a Makefile.am snippet that uses @@ substitution specific to the modules that were in use, with details learned at configure time. The latter works by poisoning anything that gnulib did not replace, but which the developer had natively available, explaining why their tests passed during development. Poisoning relies on gcc features, and requires manual triggering by adding -DGNULIB_POSIXCHECK to CFLAGS; it assumes that <config.h> is properly included. In fact, we do not want to use @@ substitution for HAVE_DECL_* during poisoning, because the warning is only relevant for the gnulib modules which were not included, and thus where the m4 macros to set proper @@ values have not been run. Furthermore, we only need to poison interfaces that already have a declaration; if something is not declared, then the developer wouldn't have been able to link, so their code won't be using the problematic interface in the first place. * modules/stdio (Depends-on, Makefile.am): Drop link-warning. * modules/unistd (Depends-on, Makefile.am): Likewise. * modules/arpa_inet (Depends-on): Replace link-warning with warn-on-use. (Makefile.am): Update rules accordingly. * modules/ctype (Depends-on, Makefile.am): Likewise. * modules/dirent (Depends-on, Makefile.am): Likewise. * modules/fcntl-h (Depends-on, Makefile.am): Likewise. * modules/inttypes (Depends-on, Makefile.am): Likewise. * modules/langinfo (Depends-on, Makefile.am): Likewise. * modules/locale (Depends-on, Makefile.am): Likewise. * modules/math (Depends-on, Makefile.am): Likewise. * modules/search (Depends-on, Makefile.am): Likewise. * modules/signal (Depends-on, Makefile.am): Likewise. * modules/spawn (Depends-on, Makefile.am): Likewise. * modules/stdlib (Depends-on, Makefile.am): Likewise. * modules/string (Depends-on, Makefile.am): Likewise. * modules/strings (Depends-on, Makefile.am): Likewise. * modules/sys_file (Depends-on, Makefile.am): Likewise. * modules/sys_ioctl (Depends-on, Makefile.am): Likewise. * modules/sys_select (Depends-on, Makefile.am): Likewise. * modules/sys_socket (Depends-on, Makefile.am): Likewise. * modules/sys_stat (Depends-on, Makefile.am): Likewise. * modules/sys_times (Depends-on, Makefile.am): Likewise. * modules/sys_utsname (Depends-on, Makefile.am): Likewise. * modules/wchar (Depends-on, Makefile.am): Likewise. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Check which functions should be poisoned. * m4/ctype.m4 (gl_CTYPE_H): Likewise. * m4/dirent_h.m4 (gl_DIRENT_H): Likewise. * m4/fcntl_h.m4 (gl_FCNTL_H): Likewise. * m4/inttypes.m4 (gl_INTTYPES_H): Likewise. * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise. * m4/locale_h.m4 (gl_LOCALE_H): Likewise. * m4/math_h.m4 (gl_MATH_H): Likewise. * m4/search_h.m4 (gl_SEARCH_H): Likewise. * m4/signal_h.m4 (gl_SIGNAL_H): Likewise. * m4/spawn_h.m4 (gl_SPAWN_H): Likewise. * m4/stdio_h.m4 (gl_STDIO_H): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise. * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise. * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise. * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise. * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar.m4 (gl_WCHAR_H): Likewise. * lib/arpa_inet.in.h: Use _GL_WARN_ON_USE instead of GL_LINK_WARNING. * lib/ctype.in.h: Likewise. * lib/dirent.in.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/math.in.h: Likewise. * lib/search.in.h: Likewise. * lib/signal.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/wchar.in.h: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* dirent: Document the last fix.Bruno Haible2010-01-071-1/+1
|
* dirent: fix test failureEric Blake2010-01-061-0/+3
| | | | | | | | | | POSIX 2008 XSI requires ino_t. But it is easier if gnulib guarantees it always, rather than just on XSI systems. * lib/dirent.in.h (includes): Guarantee ino_t. Reported by Ralf Wildenhues. Signed-off-by: Eric Blake <ebb9@byu.net>
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* dirfd: fix prototypeEric Blake2009-12-191-1/+1
| | | | | | | | | Fix prototype to match POSIX. * lib/dirent.in.h (dirfd): Argument is not const, per POSIX. * lib/dirfd.c (dirfd): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* New module 'arg-nonnull'. Declare which arguments expect non-NULL values.Bruno Haible2009-12-111-5/+9
|
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-2/+2
|
* fdopendir: fix GNU/Hurd bugEric Blake2009-10-061-1/+5
| | | | | | | | | | | | | | | | | fdopendir(open("file",O_RDONLY)) mistakenly succeeded, with subsequent readdir() failing with ENOTDIR. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in allowing non-directory fds. * lib/fdopendir.c (rpl_fdopendir): Work around it. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness. * modules/dirent (Makefile.am): Substitute it. * lib/dirent.in.h (fdopendir): Declare replacement. * doc/posix-functions/fdopendir.texi (fdopendir): Document this. * tests/test-fdopendir.c (main): Test something other than /dev/null, since on Hurd that behaves like a directory. Signed-off-by: Eric Blake <ebb9@byu.net>
* fchdir: improve use of replacement functionsEric Blake2009-09-151-5/+6
| | | | | | | | | | | | | | | | * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add REPLACE_OPENDIR, REPLACE_CLOSEDIR. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_DUP. * modules/sys_stat (Makefile.am): Substitute correct witness. * modules/dirent (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * lib/dirent.in.h (opendir, closedir): Use better witnesses. * lib/unistd.in.h (dup): Likewise. * lib/sys_stat.in.h (fstat): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* fdopendir: split into its own moduleEric Blake2009-09-021-0/+17
| | | | | | | | | | | | | | | | | | | | | | | * lib/openat.c (fdopendir): Move... * lib/fdopendir.c: ...into new file. * modules/fdopendir: New module. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file. * modules/openat (Depends-on): Add fdopendir. * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for fdopendir here. * modules/savedir (Depends-on): Only need fdopendir, not full openat. * lib/savedir.c (include): Use <dirent.h>, not "openat.h". * lib/openat.h (fdopendir): Drop prototype. * lib/dirent.in.h (fdopendir): Provide prototype. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements. * modules/dirent (Makefile.am): Substitute them. * MODULES.html.sh (File system functions): Mention it. * doc/posix-functions/fdopendir.texi (fdopendir): Likewise. * modules/fdopendir-tests: New file. * tests/test-fdopendir.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* New module 'alphasort'.Bruno Haible2009-01-181-0/+13
|
* New module 'scandir'.Bruno Haible2009-01-181-2/+20
|
* Move the dirfd() declaration to <dirent.h>.Bruno Haible2008-10-191-1/+19
|