summaryrefslogtreecommitdiff
path: root/lib/savewd.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* Rely on new stdbool behaviorPaul Eggert2022-09-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer the C23 style to the C99 style, since the stdbool module now supports C23. * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h: * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c: * lib/backup-internal.h, lib/backupfile.c, lib/base32.h: * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h: * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c: * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c: * lib/classpath.h, lib/clean-temp-private.h: * lib/clean-temp-simple.c, lib/clean-temp-simple.h: * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h: * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h: * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c: * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h: * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c: * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c: * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c: * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c: * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c: * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h: * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c: * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c: * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c: * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h: * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c: * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h: * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h: * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c: * lib/lchown.c, lib/localeinfo.h, lib/localename.c: * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h: * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c: * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h: * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h: * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c: * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c: * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h: * lib/priv-set.c, lib/progreloc.c, lib/propername.c: * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c: * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h: * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c: * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h: * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h: * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h: * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c: * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c: * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c: * lib/tempname.c, lib/term-style-control.c: * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c: * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h: * lib/unicase/caseprop.h, lib/unicase/invariant.h: * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c: * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c: * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c: * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c: * lib/unicase/u8-is-invariant.c, lib/unictype.in.h: * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c: * lib/unigbrk/u32-grapheme-breaks.c: * lib/unigbrk/u8-grapheme-breaks.c: * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c: * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c: * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h: * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h: * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c: * lib/xstrtod.h, lib/yesno.h: * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c: * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c: * tests/test-areadlinkat.c, tests/test-base32.c: * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c: * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c: * tests/test-dup3.c, tests/test-exclude.c: * tests/test-execute-child.c, tests/test-execute-main.c: * tests/test-execute-script.c, tests/test-explicit_bzero.c: * tests/test-fchownat.c, tests/test-fcntl-safer.c: * tests/test-fcntl.c, tests/test-fdutimensat.c: * tests/test-filenamecat.c, tests/test-floor2.c: * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c: * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h: * tests/test-hard-locale.c, tests/test-hash.c: * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c: * tests/test-immutable.c, tests/test-intprops.c: * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c: * tests/test-lstat.c, tests/test-mbmemcasecmp.c: * tests/test-mbmemcasecoll.c, tests/test-mkdir.c: * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c: * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c: * tests/test-nonblocking-pipe-main.c: * tests/test-nonblocking-socket-child.c: * tests/test-nonblocking-socket-main.c, tests/test-open.c: * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c: * tests/test-poll.c, tests/test-posix_spawn-chdir.c: * tests/test-posix_spawn-dup2-stdin.c: * tests/test-posix_spawn-dup2-stdout.c: * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c: * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c: * tests/test-quotearg.c, tests/test-readlink.c: * tests/test-readlinkat.c, tests/test-readtokens.c: * tests/test-rename.c, tests/test-renameat.c: * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c: * tests/test-select.h, tests/test-spawn-pipe-child.c: * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c: * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c: * tests/test-symlink.c, tests/test-symlinkat.c: * tests/test-system-quote-main.c: * tests/test-term-style-control-hello.c: * tests/test-term-style-control-yes.c, tests/test-timespec.c: * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c: * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c: * tests/test-utimens.c, tests/test-utimensat.c: * tests/unictype/test-categ_byname.c: * tests/unigbrk/test-uc-is-grapheme-break.c: Don’t include stdbool.h. * modules/acl, modules/xgetcwd: Don’t depend on stdbool, as these modules don’t use bool. * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl: * modules/gen-uni-tables, modules/getrandom: * modules/hash-triple-simple, modules/posix_spawn-internal: * modules/strcasestr, modules/supersede, modules/system-quote: * modules/uniconv/base, modules/uniname/uniname, modules/utime: * modules/windows-timedrwlock: Depend on stdbool, as these modules use bool.
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* attribute: new modulePaul Eggert2020-05-031-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies use of GCC and C2X attributes like ‘deprecated’. * MODULES.html.sh: Add attribute. * doc/attribute.texi, lib/attribute.h, modules/attribute: New files. * doc/gnulib.texi (Particular Modules): Add Attributes. * lib/backupfile.c, lib/fnmatch.c, lib/freopen-safer.c: * lib/mbrtoc32.c, lib/mbrtowc.c, lib/nstrftime.c, lib/quotearg.c: * lib/savewd.c, lib/unistr/u8-uctomb-aux.c, lib/unistr/u8-uctomb.c: * lib/vasnprintf.c: Include attribute.h, and let it define FALLTHROUGH. * lib/bitset/base.h, lib/c-stack.c (__attribute__): Remove macro. * lib/bitset/base.h (ATTRIBUTE_UNUSED): Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED, for forwards compatibility to C2X. * lib/dfa.c (FALLTHROUGH): Define consistently with gl_COMMON_BODY. This is a copy since Gawk doesn’t use Gnulib. * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Remove definition that is incompatible with gl_COMMON_BODY’s. All uses changed. * lib/fts.c: Include attribte.h, for FALLTHROUGH. Keep the existing FALLTHROUGH definition since Glibc might use it, and it does no harm to Gnulib’s FALLTHROUGH. * lib/fts_.h, lib/inttostr.h: (__GNUC_PREREQ): Remove; no longer needed. (__attribute_warn_unused_result__): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. * lib/gl_list.h, lib/gl_map.h, lib/gl_omap.h, lib/gl_oset.h: * lib/gl_set.h: Prefer _GL_ATTRIBUTE_NODISCARD to an ifdeffed __attribute__ ((__warn_unused_result__)), for forward compatibility to C2X. * lib/hash.h (_GL_ATTRIBUTE_WUR): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. (_GL_ATTRIBUTE_DEPRECATED): Remove, since gl_COMMON_BODY defines it. * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Remove. All uses replaced by gl_COMMON_BODY’s implementation, which has a slightly different signature. * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. * lib/unused-parameter.h (_GL_UNUSED_PARAMETER): Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED. No doubt all uses should be replaced, at some point. * m4/gnulib-common.m4 (_GL_GNUC_PREREQ): New macro. (_Noreturn): Use it. (_GL_HAS_ATTRIBUTE, _GL_ATTRIBUTE_ALLOC_SIZE) (_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL) (_GL_ATTRIBUTE_COLD) (_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR) (_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE) (_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT) (_GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MAY_ALIAS) (_GL_ATTRIBUTE_MAYBE_UNUSED) (_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE) (_GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING) (_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE) (_GL_ATTRIBUTE_SENTINEL): New macros. * modules/backup-rename, modules/backupfile, modules/c-vasnprintf: * modules/fnmatch, modules/freopen-safer, modules/fts: * modules/mbrtoc32, modules/mbrtowc, modules/nstrftime: * modules/quotearg, modules/savewd: * modules/unistdio/u16-u16-vasnprintf: * modules/unistdio/u16-vasnprintf: * modules/unistdio/u32-u32-vasnprintf: * modules/unistdio/u32-vasnprintf: * modules/unistdio/u8-u8-vasnprintf: * modules/unistdio/u8-vasnprintf: * modules/unistdio/ulc-vasnprintf: * modules/unistr/u8-uctomb, modules/vasnprintf: (Depends-on:): Add attribute module.
* Use module 'filename' instead of module 'dosname'.Bruno Haible2020-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/at-func.c: Include filename.h instead of dosname.h. * lib/unlinkat.c: Likewise. * modules/areadlinkat (Depends-on): Add filename. Remove dosname. * modules/areadlinkat-with-size (Depends-on): Likewise. * modules/faccessat (Depends-on): Likewise. * modules/fchmodat (Depends-on): Likewise. * modules/fchownat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/mkdirat (Depends-on): Likewise. * modules/mkfifoat (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/selinux-at (Depends-on): Likewise. * modules/symlinkat (Depends-on): Likewise. * modules/unlinkat (Depends-on): Likewise. * modules/utimensat (Depends-on): Likewise. * lib/at-func2.c: Include filename.h instead of dosname.h. * modules/linkat (Depends-on): Add filename. Remove dosname. * modules/renameatu (Depends-on): Likewise. * lib/canonicalize.c: Include filename.h instead of dosname.h. * lib/canonicalize-lgpl.c: Likewise. * modules/canonicalize (Depends-on): Add filename. * modules/canonicalize-lgpl (Depends-on): Likewise. * lib/dirname.h: Include filename.h instead of dosname.h. * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname. * lib/fchdir.c: Include filename.h instead of dosname.h. * modules/fchdir (Depends-on): Add filename. Remove dosname. * lib/openat.c: Include filename.h instead of dosname.h. * modules/openat (Depends-on): Add filename. Remove dosname. * lib/rmdir.c: Include filename.h instead of dosname.h. * modules/rmdir (Depends-on): Add filename. Remove dosname. * lib/savewd.c: Include filename.h instead of dosname.h. * modules/savewd (Depends-on): Add filename. Remove dosname. * lib/unlink.c: Include filename.h instead of dosname.h. * modules/unlink (Depends-on): Add filename. Remove dosname. * modules/relocatable-prog-wrapper (Depends-on): Add filename. * lib/relocwrapper.c: Update comments. * modules/lstat (Depends-on): Remove dosname.
* 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
|
* maint: update to work with GCC7's -Werror=implicit-fallthrough=Jim Meyering2017-06-101-2/+10
| | | | | | * lib/savewd.c (FALLTHROUGH): Define. (savewd_save, savewd_restore): Use this, rather than a comment, whenever one switch case falls through into the next.
* Remove repeated words in comments.Bjarni Ingi Gislason2017-05-221-1/+1
| | | | Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* 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'.
* 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'.
* savewd: remove SAVEWD_CHDIR_READABLEPaul Eggert2015-09-221-1/+1
| | | | | | | | | | | | | | It was problematic in the light of file systems that ignore umask. Problem reported by Sebastian Ungar in: http://bugs.gnu.org/21534 * NEWS: Document this. * lib/mkancesdirs.c (mkancesdirs): MAKE_DIR now returns 0 if successful, -1 (setting errno) on failure, rather than something more complicated than that. * lib/mkdir-p.c (make_dir_parents): Do not use SAVEWD_CHDIR_READABLE. * lib/savewd.c (savewd_chdir): Remove support for SAVEWD_CHDIR_READABLE. * lib/savewd.h (SAVEWD_CHDIR_READABLE): Remove.
* 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'.
* assure: new modulePaul Eggert2014-12-201-8/+8
| | | | | | | | | | | | | | | This works better than 'assert' when compiling with -DNDEBUG, as it avoids some compiler diagnostics in that case. Reported by Norihiro Tanaka in: http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00215.html * MODULES.html.sh (func_all_modules): Add 'assure'. * lib/assure.h, modules/assure: New files. * lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c: * lib/poll.c, lib/savewd.c, lib/utimens.c, lib/xstrtol.c: Prefer 'assure' to 'assert'. * modules/chdir-long, modules/cycle-check, modules/fchdir: * modules/poll, modules/savewd, modules/utimens, modules/xstrtol: Depend on 'assure'.
* 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>
* chdir-long, cycle-check, savewd: better 'inline'Paul Eggert2012-11-291-1/+3
| | | | | | | | | | | | | | | | | * lib/chdir-long.c (cdb_init, cdb_fchdir, cdb_free) (find_non_slash): * lib/cycle-check.c (is_zero_or_power_of_two): * lib/savewd.c (savewd_delegating): Change 'static inline' to 'inline'. * lib/savewd.c, lib/savewd.h (SAVEWD_INLINE): New macro. Replace all remaining uses of 'static inline' with it. * lib/savewd.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): * m4/cycle-check.m4 (gl_CYCLE_CHECK): * m4/savewd.m4 (gl_SAVEWD): Do not require AC_C_INLINE. * modules/savewd (Depends-on): Add extern-inline.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* dirname: move m4/dos.m4 functionality into lib/dosname.hPaul Eggert2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m4/dos.m4 needs to go. It laboriously invokes the C compiler, and extracts symbols from it, puts them into config.h; but it's much easier to use the symbols directly. filename.h already does this, but it disagrees with dos.m4 in some respects. This patch introduces a different include file dosname.h that packages up dos.m4, and then later we can work on merging filename.h and dosname.h. Applications that need only the easy-to-configure symbols should consider including dosname.h rather than dirname.h. * NEWS: Mention incompatible changes. * m4/dos.m4: Remove. * lib/dosname.h, modules/dosname: New files. * lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN): (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h. * lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c: Include dosname.h, not dirname.h. * lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c: Include dosname.h, for definitions of symbols like ISSLASH that used to be in config.h. * m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/stat.m4 (gl_FUNC_STAT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * modules/dirname-lgpl (Files): Omit m4/dos.m4. * modules/rmdir (Files): Likewise. * modules/stat (Files): Likewise. * modules/unlink (Files): Likewise. * modules/dirname-lgpl (Depends-on): Add dosname. * modules/lstat (Depends-on): Likewise. * modules/openat (Depends-on): Likewise. * modules/rmdir (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * modules/stat (Depends-on): Likewise. * modules/unlink (Depends-on): Likewise. * modules/openat (Depends-on): Remove dirname-lgpl. * modules/savewd (Depends-on): Likewise. * tests/test-dirname.c: Do not use removed symbols like FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR. Instead, use the remaining symbols, e.g., ISSLASH ('\\').
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* fcntl-h, etc.: prefer O_SEARCH to O_RDONLY when applicablePaul Eggert2010-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | POSIX 2008 specifies a new 'open' flag O_SEARCH, which can be used when one needs search access to a directory but not read access. On systems where it is available, it works in some cases where O_RDONLY does not, namely on directories that are searchable but not readable, and which need only to be searchable. If O_SEARCH is not available, fall back to the traditional method of using O_RDONLY. * lib/fcntl.in.h (O_SEARCH): #define to O_RDONLY if not defined. * lib/chdir-long.c (cdb_advance_fd): Use O_SEARCH, not O_RDONLY, when opening a directory that needs only to be searchable. * lib/chdir-safer.c (chdir_no_follow): Likewise. * lib/fts.c (diropen, fts_open, fd_ring_check): Likewise. * lib/openat-proc.c (openat_proc_name): Likewise. * lib/openat.c (openat_needs_fchdir): Likewise. * lib/save-cwd.c (save_cwd): Likewise. * lib/savewd.c (savewd_save, savewd_chdir): Likewise.
* 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
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-99/+99
|
* errno: use consistentlyEric Blake2009-09-021-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/c-stack.c (ENOTSUP): <errno.h> guarantees a definition. * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise. * lib/canonicalize.c (ELOOP): Likewise. * lib/inet_ntop.c (EAFNOSUPPORT): Likewise. * lib/inet_pton.c (EAFNOSUPPORT): Likewise. * lib/lchown.c (EOPNOTSUPP): Likewise. * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise. * lib/savewd.c (ESTALE): Likewise. * lib/settime.c (ENOSYS): Likewise. * lib/utimens.c (ENOSYS): Likewise. * lib/xgethostname.c (ENAMETOOLONG): Likewise. * lib/chdir-safer.c (ELOOP): Likewise. (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness. * modules/c-stack (Depends-on): Add errno. * modules/canonicalize (Depends-on): Likewise. * modules/chdir-safer (Depends-on): Likewise. * modules/fdopendir (Depends-on): Likewise. * modules/inet_ntop (Depends-on): Likewise. * modules/inet_pton (Depends-on): Likewise. * modules/lchown (Depends-on): Likewise. * modules/openat (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * modules/settime (Depends-on): Likewise. * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink. Signed-off-by: Eric Blake <ebb9@byu.net>
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* * lib/savewd.c (ESTALE) [!defined]: Define.Jim Meyering2007-09-171-0/+3
| | | | Reported to be required on Interix by Martin Koeppe.
* When trying to open ".", treat ESTALE like EACCES.Jim Meyering2007-03-211-1/+1
| | | | | * lib/savewd.c (savewd_save): Resort to forking not just upon failure with EACCES, but also when errno is ESTALE.
* exit.h is replaced with stdlib.h.Bruno Haible2007-02-181-2/+2
|
* [lib/ChangeLog]Paul Eggert2006-10-051-1/+2
| | | | | | | | | | | | | * fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE; we now test for that separately. * fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW rather than O_NOFOLLOW, when testing whether it's possible to avoid a race condition reliably. * savewd.c (savewd_chdir): Likewise. [m4/ChangeLog] * fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead of O_NOFOLLOW_IS_INEFFECTIVE. Define HAVE_WORKING_O_NOATIME if O_NOATIME works.
* [ChangeLog]Paul Eggert2006-09-261-0/+1
| | | | | | * modules/savewd (Depends-on): Add 'raise'. [lib/ChangeLog] * savewd.c: Include <signal.h>, for 'raise'.
* * savewd.c (savewd_restore): Don't shadow: s/status/child_status/.Jim Meyering2006-09-181-5/+5
|
* Initial revision.Paul Eggert2006-09-181-0/+305