summaryrefslogtreecommitdiff
path: root/m4/getcwd-abort-bug.m4
Commit message (Collapse)AuthorAgeFilesLines
* getcwd: Fix cross-compilation guess for musl libc.Bruno Haible2021-01-241-10/+9
| | | | | | * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on musl libc. * doc/posix-functions/getcwd.texi: Update platform info.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* getcwd: Change configure message.Bruno Haible2020-08-271-13/+13
| | | | | | * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Say "checking whether getcwd succeeds when 4k < cwd_length < 16k..." instead of "checking whether getcwd aborts when 4k < cwd_length < 16k...".
* doc: Update for OpenBSD 6.0, 6.7.Bruno Haible2020-08-231-2/+2
| | | | | | | | | | | | * doc/*/*.texi: Update. * m4/printf.m4: Update comments and cross-compilation guesses. * m4/ceill.m4: Update comments. * m4/getcwd-abort-bug.m4: Likewise. * m4/ilogb.m4: Likewise. * m4/ilogbf.m4: Likewise. * m4/langinfo_h.m4: Likewise. * m4/modf.m4: Likewise. * m4/modff.m4: Likewise.
* Support compiling without -loldnames on native Windows.Bruno Haible2020-08-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros. * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES. (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/dup2.m4 (gl_FUNC_DUP2): Likewise. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise. * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise. * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE): Likewise. * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise. * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise. * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise. * m4/pread.m4 (gl_FUNC_PREAD): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/select.m4 (gl_FUNC_SELECT): Likewise. * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise. * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise. * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * m4/utimens.m4 (gl_UTIMENS): Likewise. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't test for getcwd. * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime. * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program with GL_MDA_DEFINES. * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro. * lib/fcntl.in.h (creat, open): On native Windows, use the underscore- prefixed symbol. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. (isfinite, isinf, isnan, signbit): On native Windows, don't define as an rpl_-prefixed macro. * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd. * lib/close.c (close_nothrow): On native Windows, use _close. * lib/creat.c (orig_creat): On native Windows, use _creat. * lib/dup.c (dup_nothrow): On native Windows, use _dup. * lib/dup2.c (dup2_nothrow): Use _dup2. * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen. * lib/getcwd-lgpl.c: On native Windows, use _getcwd. * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw. * lib/open.c (orig_open): On native Windows, use _open. * lib/read.c (read_nothrow): Use _read. * lib/rmdir.c: On native Windows, use _rmdir. * lib/unlink.c: On native Windows, use _unlink. * lib/write.c (write_nothrow): Use _write. * lib/sys_select.in.h (close): With clang, don't attach a warning on an undefined symbol. * lib/sys_socket.in.h (close): Likewise. * lib/sys_time.in.h (close): Likewise. * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
* getcwd: Remove obsolete code.Bruno Haible2020-08-141-4/+1
| | | | | * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't #undef mkdir. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Support cross-compilation to musl libc.Bruno Haible2019-03-231-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Necktwi Ozfguah <necktwi@ferryfair.com>. * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for musl libc. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise. * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise. * m4/ceil.m4 (gl_FUNC_CEIL): Likewise. * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise. * m4/ceill.m4 (gl_FUNC_CEILL): Likewise. * m4/chown.m4 (gl_FUNC_CHOWN): Likewise. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Likewise. * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. * m4/floor.m4 (gl_FUNC_FLOOR): Likewise. * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise. * m4/fmod.m4 (gl_FUNC_FMOD): Likewise. * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise. * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise. * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. * m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise. * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise. * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise. * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise. * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. * m4/log.m4 (gl_FUNC_LOG): Likewise. * m4/logf.m4 (gl_FUNC_LOGF): Likewise. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise. * m4/log10.m4 (gl_FUNC_LOG10): Likewise. * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise. * m4/log10l.m4 (gl_FUNC_LOG10L): Likewise. * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise. * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. * m4/log2.m4 (gl_FUNC_LOG2): Likewise. * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise. * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/modf.m4 (gl_FUNC_MODF): Likewise. * m4/modff.m4 (gl_FUNC_MODFF): Likewise. * m4/modfl.m4 (gl_FUNC_MODFL): Likewise. * m4/perror.m4 (gl_FUNC_PERROR): Likewise. * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99): Likewise. * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise. * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise. * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise. * m4/rintl.m4 (gl_FUNC_RINTL): Likewise. * m4/round.m4 (gl_FUNC_ROUND): Likewise. * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. * m4/setenv.m4 (gl_FUNC_SETENV): Likewise. * m4/signbit.m4 (gl_SIGNBIT): Likewise. * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise. * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise. * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
* Clarify that cross-compilation guesses are guesses.Bruno Haible2019-03-231-4/+12
| | | | | | | | | | | | | | | | | | | | * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add prefix 'guessing ' to gl_cv_func_chown_follows_symlink. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug. * m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to gl_cv_glob_lists_symlinks. * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix 'guessing ' to ac_cv_func_malloc_0_nonnull. * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix 'guessing ' to ac_cv_func_realloc_0_nonnull. * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix 'guessing ' to gl_cv_func_poll. * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross- compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* getpagesize: Fix compilation error on Android.Bruno Haible2018-05-131-2/+8
| | | | | | | | | * m4/getpagesize.m4 (gl_CHECK_FUNC_GETPAGESIZE): New macro. (gl_FUNC_GETPAGESIZE): Invoke it instead of AC_CHECK_FUNC. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't invoke AC_CHECK_FUNC. Instead, invoke gl_CHECK_FUNC_GETPAGESIZE and define HAVE_GETPAGESIZE accordingly. * modules/getcwd (Files): Add m4/getpagesize.m4.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* More systematic m4 quoting and indentation.Bruno Haible2017-07-111-17/+17
| | | | | | | | | | | | | | | | | | | | | * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. * m4/host-os.m4 (gl_HOST_OS): Likewise. * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H, gl_WINSIZE_IN_PTEM): Likewise. * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise. * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically. Correct indentation. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
* 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'.
* 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>
* getcwd: fix compile error in configure checkPádraig Brady2013-12-041-0/+1
| | | | | | Introduced in commit ca369c8d, 2013-02-03 * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h
* getcwd: break fdopendir + save_cwd recursive loop (Bug#13516)Paul Eggert2013-02-031-26/+36
| | | | | | | | | | | | | | | Reported for OS X 10.8.2 by Assaf Gordon in <http://bugs.gnu.org/13516>. * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Do not define if !HAVE_OPENAT && !HAVE_FDOPENDIR. * m4/getcwd-abort-bug.m4: Reformat to match test-getcwd.c so that they can be kept in sync more easily. Avoid PATH_MAX test on the Hurd. Sync from test-getcwd.c for errno tests after mkdir or chdir failure. * tests/test-getcwd.c (HAVE_OPENAT_SUPPORT): New macro, from lib/getcwd.c. (test_abort_bug): Do not test for the deep directory bug unless we have openat support. Avoid PATH_MAX test on the Hurd.
* 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>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* getcwd: Fix bug from 2011-08-17.Bruno Haible2011-11-281-7/+15
| | | | | | | | * m4/getcwd.m4 (gl_FUNC_GETCWD): Set REPLACE_GETCWD to 1 only on platforms that need it. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Consider a return code of 4 to be a failure, not a success. This ensures that REPLACE_GETCWD becomes 1 on OpenBSD 4.9 and NetBSD 5.1.
* Consolidate all uses of PATH_MAX in *.m4 files.Bruno Haible2011-09-221-2/+4
| | | | | | | | | | | * m4/pathmax.m4 (gl_PATHMAX_SNIPPET, gl_PATHMAX_SNIPPET_PREREQ): New macros. * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use gl_PATHMAX_SNIPPET_PREREQ and gl_PATHMAX_SNIPPET. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * modules/chdir-long (Files): Add m4/pathmax.m4. * modules/getcwd (Files): Likewise.
* unistd et al.: Don't assume <unistd.h> exists.Bruno Haible2011-09-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it does not exist. * m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not exist. But include <stdlib.h>. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist, include <io.h> and <stdlib.h> instead. Don't test symbolink links if symlink() does not exist. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist, include <io.h> instead. * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist, include <direct.h> instead. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include <io.h> instead. * m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links correctly if the system does not have hard links. * m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include <direct.h> instead. * m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass it when looking for function declarations. * m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include <direct.h> and <io.h> instead. * doc/posix-headers/unistd.texi: More details about MSVC problem.
* test-getcwd.c: avoid new set-but-not-used warningJim Meyering2011-04-291-5/+12
| | | | | | | | * tests/test-getcwd.c (test_abort_bug): Exit nonzero for any problem, not just the glibc/abort one that getcwd-abort-bug.m4 detects. This also adds an additional test for an unlikely chdir("..") failure. * m4/getcwd-abort-bug.m4: Update this now-duplicated code to match, and adjust the code that sets gl_cv_func_getcwd_abort_bug accordingly.
* getcwd: enhance testsEric Blake2011-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | The existing getcwd was weak, and only tested things guaranteed by the new getcwd-lgpl. Move those tests into a new file and strengthen them slightly (such as guaranteeing the ERANGE error for a non-zero but too-small size). Then copy the m4 tests for PATH_MAX failures into the GPL getcwd tests, to prove that our replacement really is fixing the things that cause us to reject the system getcwd as non-robust. * tests/test-getcwd-lgpl.c: New file, taken from... * tests/test-getcwd.c: ...old contents. Rewrite this file to repeat long path stress tests from m4 probe. * modules/getcwd-lgpl-tests: New module. * modules/getcwd-tests (Depends-on): Depend on lgpl tests. * m4/getcwd-abort-bug.m4: Update comment. * m4/getcwd-path-max.m4: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* getcwd: tweak commentsEric Blake2011-04-271-2/+2
| | | | | | | | * m4/getcwd-abort-bug.m4: Fix comments. * m4/getcwd-path-max.m4: Likewise. * m4/getcwd.m4: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* 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
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-7/+7
|
* many *.m4 files: improve m4 quotingJim Meyering2009-01-141-4/+4
| | | | | | | | | | | | | | | | 99% of this change was performed by running the following commands: git ls-files | grep '\.m4$' | xargs perl -pi \ -e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g' perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4 The remainder were to add Copyright dates, increment serial numbers, undo some changes in comments, exclude m4/intl.m4, and add quotes around the "1" in ",1" where the unusual spacing prohibited the above regexps from doing the job. For more details, see <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
* Merge from coreutils.Paul Eggert2006-07-031-0/+106