1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Commit Graph

772 Commits

Author SHA1 Message Date
Bruno Haible
f4d71054e7 truncate: New module.
* lib/unistd.in.h (truncate): New declaration.
* lib/truncate.c: New file.
* m4/truncate.m4: New file.
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared.
(gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE,
REPLACE_TRUNCATE.
* modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE,
HAVE_TRUNCATE, REPLACE_TRUNCATE.
* modules/truncate: New file.
* tests/test-unistd-c++.cc (truncate): Test signature.
* doc/posix-functions/truncate.texi: Mention the new module.
2017-05-13 02:54:37 +02:00
Bruno Haible
055746f501 gettimeofday: Increase precision on mingw.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Require AC_CANONICAL_HOST.
Set REPLACE_GETTIMEOFDAY to 1 on mingw.
* lib/gettimeofday.c (gettimeofday): On native Windows, use the
GetSystemTimePreciseAsFileTime based implementation always.
* doc/posix-functions/gettimeofday.texi: Mention precision problem on
mingw.
2017-05-11 21:39:06 +02:00
Bruno Haible
df7f87dfe6 doc: Clarify doc about socket functions on native Windows.
This reworks doc that was added on 2008-09-29.

* doc/posix-functions/select.texi: Fix copy-and-paste mistake and use
clearer wording.
* doc/posix-functions/accept.texi: Use clearer wording.
* doc/posix-functions/bind.texi: Likewise.
* doc/posix-functions/connect.texi: Likewise.
* doc/posix-functions/getpeername.texi: Likewise.
* doc/posix-functions/getsockname.texi: Likewise.
* doc/posix-functions/getsockopt.texi: Likewise.
* doc/posix-functions/ioctl.texi: Likewise.
* doc/posix-functions/listen.texi: Likewise.
* doc/posix-functions/recv.texi: Likewise.
* doc/posix-functions/recvfrom.texi: Likewise.
* doc/posix-functions/send.texi: Likewise.
* doc/posix-functions/sendto.texi: Likewise.
* doc/posix-functions/setsockopt.texi: Likewise.
* doc/posix-functions/shutdown.texi: Likewise.
* doc/posix-functions/socket.texi: Likewise.
2017-05-11 15:23:11 +02:00
Paul Eggert
b0ebe1b9a5 tzset: update doc for TZ problems on MS-Windows
* doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
* doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
* doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
* doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
* doc/posix-functions/wcsftime.texi:
Mention some issues with TZ under MS-Windows.
2017-05-01 18:01:42 -07:00
Bruno Haible
210cb7a9fb tzset: Work around TZ problem on native Windows.
* m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native
Windows, set REPLACE_TZSET to 1.
* lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and
invoke '_tzset' instead of 'tzset'.
* doc/posix-functions/tzset.texi: Mention the native Windows workaround.

* modules/time_rz (Depends-on): Add tzset.
* lib/time_rz.c (tzset): Remove fallback definition.
* m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
2017-05-01 18:37:41 +02:00
Bruno Haible
05226f4e52 wcsftime: New module.
* lib/wchar.in.h (wcsftime): New declaration.
* lib/wcsftime.c: New file.
* m4/wcsftime.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
(gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wcsftime: New file.
* doc/posix-functions/wcsftime.texi: Mention the new module.
2017-04-30 19:26:39 +02:00
Bruno Haible
9df4babee6 strftime-fixes: New module.
* lib/time.in.h (strftime): New declaration.
* lib/strftime-fixes.c: New file.
* m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Inline gl_FUNC_STRFTIME macro.
(gl_FUNC_STRFTIME): Remove macro.
* m4/strftime-fixes.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_STRFTIME,
REPLACE_STRFTIME.
* modules/time (Makefile.am): Substitute GNULIB_STRFTIME,
REPLACE_STRFTIME.
* modules/strftime-fixes: New file.
* doc/posix-functions/strftime.texi: Mention the new module.
2017-04-30 19:26:38 +02:00
Bruno Haible
db1ee11e21 mktime: Work around TZ problem on native Windows.
* lib/mktime.c: Add #ifs to make the algorithmic workaround independent
from the native Windows workaround.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
'guessing no'.
(gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
NEED_MKTIME_WINDOWS.
(gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
NEED_MKTIME_INTERNAL.
* m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Cope with 'guessing yes' value.
* modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
not REPLACE_MKTIME.
* doc/posix-functions/mktime.texi: Mention the native Windows
workaround.
2017-04-30 19:26:38 +02:00
Bruno Haible
16778a2911 localtime: New module.
* lib/time.in.h (localtime): Declare also if requested by module
'localtime'.
* lib/localtime.c: New file.
* m4/localtime.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_LOCALTIME.
* modules/time (Makefile.am): Substitute GNULIB_LOCALTIME.
* modules/localtime: New file.
* doc/posix-functions/localtime.texi: Mention the new module.
2017-04-30 19:26:37 +02:00
Bruno Haible
8c59a9eb5c ctime: New module.
* lib/time.in.h (ctime): New declaration.
* lib/ctime.c: New file.
* m4/ctime.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_CTIME,
REPLACE_CTIME.
* modules/time (Makefile.am): Substitute GNULIB_CTIME, REPLACE_CTIME.
* modules/ctime: New file.
* doc/posix-functions/ctime.texi: Mention the new module.
2017-04-30 19:26:37 +02:00
Bruno Haible
6736a88333 Document the problem with the Cygwin environment variable TZ.
* doc/posix-functions/tzset.texi: Add note about TZ.
* doc/posix-functions/ctime.texi: Likewise.
* doc/posix-functions/localtime.texi: Likewise.
* doc/posix-functions/mktime.texi: Likewise.
* doc/posix-functions/strftime.texi: Likewise.
* doc/posix-functions/wcsftime.texi: Likewise.
* doc/pastposix-functions/ftime.texi: Likewise.
2017-04-30 19:26:36 +02:00
Bruno Haible
e5194dcec6 utime: New module.
* lib/utime.in.h: Add comment for snippets.
(utime): New declaration.
* lib/utime.c: New file.
* m4/utime.m4: New file.
* m4/utime_h.m4 (gl_UTIME_H): Test for utime declaration.
(gl_UTIME_H_DEFAULTS): Initialize GNULIB_UTIME, HAVE_UTIME,
REPLACE_UTIME.
* modules/utime-h (Depends-on): Add snippets.
(Makefile.am): Substitute GNULIB_UTIME, HAVE_UTIME, REPLACE_UTIME.
Insert snippets.
* modules/utime: New file.
* doc/posix-functions/utime.texi: Mention the new module.
2017-04-30 19:25:55 +02:00
Bruno Haible
33390878c1 Fix a few typos.
* m4/fstat.m4 (gl_FUNC_FSTAT): Require AC_CANONICAL_HOST.
* m4/stat.m4 (gl_FUNC_STAT): Fix comment.
* doc/posix-functions/fstat.texi: Fix a plural typo.
* doc/posix-functions/stat.texi: Likewise.
* m4/include_next.m4: Update comments.
2017-04-30 10:15:55 +02:00
Bruno Haible
bd48174329 stat: Fix time_t values and other problems on native Windows platforms.
* doc/posix-functions/stat.texi: Mention the problem with the Microsoft
implementations of stat().
* lib/stat.c: Include filename.h instead of dosname.h. Include
malloca.h, stat-w32.h.
(is_unc_root): New function.
(rpl_stat): New implementation for native Windows. Remove
REPLACE_FUNC_STAT_DIR code.
* m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
Don't define REPLACE_FUNC_STAT_DIR.
(gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
* modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove dosname. Add filename, malloca.
(configure.ac): Also compile lib/stat-w32.c.
2017-04-29 22:52:04 +02:00
Bruno Haible
fcb99f4037 fstat: Fix time_t values on native Windows platforms.
* doc/posix-functions/fstat.texi: Mention the problem with st_*time.
* lib/stat-w32.h: New file.
* lib/stat-w32.c: New file.
* lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
stat-w32.h instead.
(fstat_nothrow): Remove function.
(rpl_fstat): Implement by means of _gl_fstat_by_handle.
* m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
always.
(gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
* modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
(configure.ac): Also compile lib/stat-w32.c.
2017-04-29 22:51:56 +02:00
Bruno Haible
765a406038 strerror_r-posix: Fixes for MSVC 14.
* lib/strerror_r.c: Include <stdarg.h>.
(strerror_r): Provide error messages for errno values 100...140.
* doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
2017-04-29 13:23:28 +02:00
Bruno Haible
63a51f5a37 getlogin_r: Work around bug in Mac OS X 10.12.
* m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test also against the Mac OS X
bug.
* lib/getlogin_r.c (getlogin_r): When getlogin_r returns a string of the
given size minus 1, call getlogin_r a second time, on a larger buffer.
* modules/getlogin_r (Depends-on): Add malloca.
* doc/posix-functions/getlogin_r.texi: Mention the Mac OS X bug.
2017-04-23 02:46:27 +02:00
Bruno Haible
dfba158b2a *printf: Work around rounding bug on Mac OS X.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Test for Mac OS X 10.12 bug.
* doc/posix-functions/*printf.texi: Mention the rounding bugs of
Mac OS X and FreeBSD.
* doc/glibc-functions/*printf.texi: Likewise.
2017-04-22 16:27:45 +02:00
Bruno Haible
d3181471f9 doc: Mention Mac OS X deficiencies regarding semaphores.
* doc/posix-functions/sem_init.texi: Mention status on Mac OS X.
* doc/posix-functions/sem_destroy.texi: Likewise.
* doc/posix-functions/sem_getvalue.texi: Likewise.
2017-03-03 12:47:04 +01:00
Paul Eggert
e89646ad6f maint: time stamp -> timestamp
Use the spelling "timestamp", as that is what POSIX uses.
2017-01-09 11:58:08 -08:00
Bruno Haible
8fe9cd1cfc getlogin: Port to newer mingw.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
* m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
* modules/unistd (Makefile.am): Substibute HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
* lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
* doc/posix-functions/getlogin.texi: Mention the issue.
* tests/test-getlogin.c: Don't include <pwd.h> on native Windows.
2016-12-17 12:05:38 +01:00
Paul Eggert
b947d0524d freopen: work around glibc bug with closed fd
Work around glibc bug#15589, where freopen mishandles the case
where stdin etc. are already closed.
* doc/posix-functions/freopen.texi (freopen): Document the bug.
* lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
instead of __need_FILE, as the latter does not work with glibc.
Include <fcntl.h>, for open flags.
(rpl_freopen): Work around glibc bug.
* m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
* modules/freopen (Depends-on): Add fcntl-h.
* tests/test-freopen.c (main): Test for bug.
2016-11-26 14:54:38 -08:00
Paul Eggert
f3852a93c7 btowc: document problems in C locale
* doc/posix-functions/btowc.texi (btowc): Mention incompatibility
with mbrtowc.  See: http://bugs.gnu.org/23269#32
2016-04-19 09:12:18 -07:00
Paul Eggert
b7bc3c1a4e mbrtowc: work around glibc bug#19932
Fix mbrtowc so that it never returns -1 in the C locale,
as this conflicts with a future version of POSIX
http://austingroupbugs.net/view.php?id=663#c2738
and causes problems with GNU grep: http://bugs.gnu.org/23234
See glibc bug 19932:
https://sourceware.org/bugzilla/show_bug.cgi?id=19932
* doc/posix-functions/mbrlen.texi (mbrlen):
* doc/posix-functions/mbrtowc.texi (mbrtowc):
Document the glibc bug.
* lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]:
Include hard-locale.h, locale.h.
(rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug,
if the bug is possible.
* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro.
(gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed.
* modules/hard-locale (License): Now LGPLv2+, for mbrtowc.
* modules/mbrtowc (Depends-on): Add hard-locale.
* modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh.
* tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'.
* tests/test-mbrtowc5.sh: New file.
2016-04-09 01:29:09 -07:00
Paul Eggert
53348f290e readdir_r: now obsolescent
* doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
* lib/mountlist.c (read_file_system_list): Add a FIXME.
2016-02-08 18:46:18 -08:00
Karl Berry
0fce642dc8 @item needed inside @itemize 2016-01-22 08:21:35 -08:00
Bruno Haible
485f1270a8 wcwidth: Replace also on OpenBSD 5.8
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A).
* doc/posix-functions/wcwidth.texi: Update.
2016-01-21 07:56:59 -08:00
KO Myung-Hun
8968c785d7 utimes: detect utimes() correctly on OS/2 kLIBC
utimes() of OS/2 kLIBC has some limitations.

1. OS/2 itself supports a file date since 1980 year in local time.
2. OS/2 itself supports only even seconds for a file time.
3. utimes() of OS/2 kLIBC does not work on an opened file.

* m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC.
* doc/posix-functions/utimes.texi: Document the above limitations of
utimes() on OS/2 kLIBC.
2016-01-15 10:09:00 -08:00
Pádraig Brady
95c4842733 doc: mention unfixed issues with unsupported localtime() values
Note perl has configure time checks in place to avoid this.

* doc/posix-functions/localtime.texi: Mention that FreeBSD 10
returns nonsense for localtime(2^56).
* doc/posix-functions/localtime_r.texi: Likewise.
2016-01-15 16:19:02 +00:00
Pádraig Brady
5ac0e2ba90 doc: mention setlocale() issues on OpenBSD
* doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"")
never fails, and the need to check categories individually.
2016-01-14 10:38:55 +00:00
Paul Eggert
848a19c75c fsync: document AIX misbehavior
* doc/posix-functions/fsync.texi (fsync):
Document failure on AIX with read-only file descriptor.
2015-06-06 00:56:37 -07:00
Pádraig Brady
8c9cfa07e6 readlinkat: avoid OS X 10.10 trailing slash bug
* doc/posix-functions/readlink.texi: Mention that OS X 10.10
has this bug.
* doc/posix-functions/readlinkat.texi: Likewise.  Also mention
that OS X 10.10 has this function.
* lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug,
as done for readlink().
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink()
trailing slash bug, and assume readlinkat() has the same issue.
Also fix a typo where $gl_cv_decl_readlink_works was tested,
rather than the correct $gl_cv_decl_readlinkat_works.
2015-05-31 03:44:51 +01:00
Pádraig Brady
c79f352749 linkat: avoid OS X 10.10 trailing slash with symlink bug
On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",)
causes the symlink to be dereferenced, and if it points
to a non existent file, that file will be created as
a hard link to "path1".
This fixes a test failure in test-linkat.c.

* m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with
this case.  The existing workaround in linkat.c for
trailing slash issues, suffices for this case.
* doc/posix-functions/linkat.texi: Add OS X 10.10 to
the list of platforms with trailing slash issues.
2015-05-29 04:05:14 +01:00
Pádraig Brady
e176ee0b5d unlinkat: handle ignoring of ".." on Darwin 14
* lib/unlinkat.c: unlinkat() has the same bug as unlink()
on Mac OS X 10.10, where it ignores paths with a trailing "..",
so handle in the same manner.
* m4/unlinkat.m4: Comment on this Darwin issue.
* doc/posix-functions/unlink.texi: Update the latest version
where the issue was seen.
* doc/posix-functions/unlinkat.texi: Mention this issue.
Fixes a test failure in test-unlinkat.c.
2015-05-28 17:18:37 +01:00
Pádraig Brady
7989720175 doc: document glibc posix_fallocate() issues
* doc/posix-functions/posix_fallocate.texi: Mention the
glibc efficiency problems and issues with NFS.
2015-05-06 16:28:01 +01:00
Paul Eggert
a39fbed384 dup2: doc and test for Android bug
Reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00125.html
* doc/posix-functions/dup2.texi (dup2): Document the bug.
* m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.
2015-02-23 10:37:06 -08:00
Paul Eggert
bd38edc817 printf, isinf, etc.: noncanonical != NaN
Do not require that isinf, printf, etc. treat noncanonical
values as NaNs.  Instead, require only that they do not crash.
Problem reported by Joseph Myers in:
https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html
* doc/posix-functions/dprintf.texi (dprintf):
* doc/posix-functions/fprintf.texi (fprintf):
* doc/posix-functions/isfinite.texi (isfinite):
* doc/posix-functions/isinf.texi (isinf):
* doc/posix-functions/isnan.texi (isnan):
* doc/posix-functions/printf.texi (printf):
* doc/posix-functions/snprintf.texi (snprintf):
* doc/posix-functions/sprintf.texi (sprintf):
* doc/posix-functions/vdprintf.texi (vdprintf):
* doc/posix-functions/vfprintf.texi (vfprintf):
* doc/posix-functions/vprintf.texi (vprintf):
* doc/posix-functions/vsnprintf.texi (vsnprintf):
* doc/posix-functions/vsprintf.texi (vsprintf):
Document this.
* m4/isfinite.m4 (gl_ISFINITEL_WORKS):
* m4/isinf.m4 (gl_ISINFL_WORKS):
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS):
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE):
* tests/test-isfinite.c (test_isfinitel):
* tests/test-isinf.c (test_isinfl):
* tests/test-isnan.c (test_long_double):
* tests/test-isnanl.h (main):
* tests/test-snprintf-posix.h (test_function):
* tests/test-sprintf-posix.h (test_function):
* tests/test-vasnprintf-posix.c (test_function):
* tests/test-vasprintf-posix.c (test_function):
o	Test only that noncanonical values do not cause crashes, not that
they are treated as NaNs.  In some cases this means a larger
output buffer is needed.
2015-02-20 18:10:46 -08:00
Pádraig Brady
8b62c05cf0 doc: mention that _BSD_SOURCE is deprecated for _DEFAULT_SOURCE
* doc/posix-functions/setjmp.texi: Defining _BSD_SOURCE will induce
warnings unless _DEFAULT_SOURCE is also defined.
2014-11-28 11:10:09 +00:00
Pádraig Brady
c8e57ce5bb linkat: wrap to handle symlinks on OS X 10.10
* m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite
but not usable because it doesn't support creating hardlinks
to symlinks.  Therefore add a generic test for this capability
and fallback to our emulation if linkat() fails with ENOTSUP.
2014-11-03 15:10:33 +01:00
Paul Eggert
08a713e078 open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
* doc/posix-functions/open.texi (open):
* doc/posix-functions/openat.texi (openat):
Document that these functions do not set errno to ELOOP when
a symlink is opened with O_NOFOLLOW.
2014-11-02 22:24:25 -08:00
Paul Eggert
032bd15105 symlinkat: port to AIX 7.1
* doc/posix-functions/symlinkat.texi (symlinkat):
Mention AIX porting problem.
* lib/symlinkat.c: Always include errno.h.
(rpl_symlinkat) [HAVE_SYMLINKAT]: New function.
* lib/unistd.in.h (symlinkat): Add replacement machinery.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Check symlinkat behavior.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_SYMLINKAT.
* modules/symlinkat (Depends-on): Add fstatat if REPLACE_SYMLINKAT.
(configure.ac): Also compile replacement if REPLACE_SYMLINKAT.
* modules/unistd (unistd.h): Substitute REPLACE_SYMLINKAT.
2014-10-18 23:23:48 -07:00
Paul Eggert
cb3a9b8b56 readlinkat: port to AIX 7.1
* doc/posix-functions/readlink.texi (readlink):
* doc/posix-functions/readlinkat.texi (readlinkat):
Mention AIX porting problem.
* lib/readlinkat.c (rpl_readlinkat) [HAVE_READLINKAT]:
New function.
* lib/unistd.in.h (readlinkat): Add replacement machinery.
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check readlinkat signature.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_READLINKAT.
* modules/readlinkat (configure.ac): Also compile replacement
if REPLACE_READLINKAT.
* modules/unistd (unistd.h): Substitute REPLACE_READLINKAT.
2014-10-18 22:36:27 -07:00
Karl Berry
b155b06498 remove spurious { 2014-10-12 09:03:23 -07:00
Ben Pfaff
322e0b052c basename, dirname: Improve documentation.
* doc/posix-functions/basename.texi: Mention dirname module and
base_name() function.
* doc/posix-functions/dirname.texi: Mention dir_name() and
mdir_name() functions.

Suggested by Werner LEMBERG <wl@gnu.org>.
2014-09-28 09:52:08 -07:00
Paul Eggert
ce49a606af accept: document Solaris 10 type glitch
* doc/posix-functions/accept.texi (accept): Mention that
Solaris 10 'accept' takes void * last arg, not socklen_t *.
2014-08-05 13:22:06 -07:00
Paul Eggert
93ce02b4fa dup2, fcntl, fcntl-h: port to AIX 7.1
This fixes some porting problems discovered when testing the latest
grep snapshot on AIX 7.1.  I don't think if fixes any bugs
in grep but it could be important for other applications.
* doc/posix-functions/dup2.texi:
* doc/posix-functions/fcntl.texi:
* doc/posix-headers/fcntl.texi:
Document AIX bugs.
* lib/fcntl.in.h (O_CLOEXEC, O_NOFOLLOW, O_TTY_INIT) [_AIX]:
Define to 0 if outside 'int' range.
* m4/dup2.m4 (gl_FUNC_DUP2):
* m4/fcntl.m4 (gl_FUNC_FCNTL):
Check for getdtablesize.  If it's available, test a value just
outside its range instead of testing 1000000.  When cross-compiling,
guess that AIX will fail this improved test.
2014-05-31 14:09:02 -07:00
Paul Eggert
6a26d6cbe9 doc: document mbrtowc and mbrlen problem with empty input
* doc/posix-functions/mbrlen.texi (mbrlen):
* doc/posix-functions/mbrtowc.texi (mbrtowc):
Document portability problem when the input string is empty.  See:
https://sourceware.org/bugzilla/show_bug.cgi?id=16950
2014-05-15 18:30:26 -07:00
Paul Eggert
61640bceda doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-grep/2014-05/msg00118.html
* doc/posix-functions/execl.texi (execl):
* doc/posix-functions/execle.texi (execle):
* doc/posix-functions/execlp.texi (execlp):
* doc/posix-functions/execv.texi (execv):
* doc/posix-functions/execve.texi (execve):
* doc/posix-functions/execvp.texi (execvp):
Mention spawn+exit problem on non-Cygwin Windows platforms.
2014-05-15 13:09:05 -07:00
Assaf Gordon
187808c6c5 expl: avoid incorrect expl(small_value) on OpenBSD 5.4
OpenBSD 5.4, expl() incorrectly returns 'nan' for small values.
Detect this and use gnulib's expl() in that case.

Discussed here:
http://marc.info/?t=139159081700002&r=1&w=2
(Message from David Coppa on 2014-02-05 to openbsd-tech mailing list).

Fixed here (in revision 1.2):
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libm/src/ld128/s_floorl.c

* m4/expl.m4 (gl_FUNC_EXPL): Add a check for this condition.
* doc/posix-functions/expl.texi: Mention the workaround.
2014-04-16 23:12:55 +01:00
Paul Eggert
fe3419dc7e doc: use ASCII in .texi files where UTF-8 isn't needed
* doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
* doc/posix-functions/setkey.texi, doc/regex.texi:
Use ASCII input, not UTF-8.
2014-01-03 11:18:38 -08:00