| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On mingw, the compiler complained that 'struct termios' and
'struct winsize' were declared in the function prototype, then
failed to compile due to missing TCSAFLUSH. Since we can't
emulate ptys on mingw, it's better to just make this module
be a stub that compiles but gracefully fails.
This patch assumes that the only portable way to use openpty()
is with the fourth and fifth arguments being NULL ('struct termios'
cannot be portably initialized in a standard-compliant manner
except by open(O_TTY_INIT)/tcgetattr(), and 'struct winsize' is
not standardized); for now, applications that want to alter termios
settings still have the burden of conditional compilation to avoid
the missing tcgetattr() on mingw.
* lib/pty.in.h (includes): Provide forward declarations.
* lib/openpty.c (openpty) [mingw]: Provide ENOSYS stub.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling for mingw, I see:
CC sigprocmask.lo
sigprocmask.c: In function '_gl_raise_SIGPIPE':
sigprocmask.c:349:1: warning: control reaches end of non-void function
which means that raise(SIGPIPE) would be using an uninitialized
value as its return.
* lib/sigprocmask.c (_gl_raise_SIGPIPE): Provide a return value.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
| |
* lib/openat.c: Reduce the scope of some #includes.
* modules/openat (Depends-on): Add conditions.
|
|
|
|
|
|
| |
* lib/stdlib.in.h (grantpt): Check correct function.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
| |
* lib/copysignl.c (compute_minus_zerol) [HP-UX]: New function.
(minus_zerol) [HP-UX]: New macro.
(unary_minus) [HP-UX]: New function.
(copysignl) [HP-UX]: Use unary_minus function.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/math.in.h (fmal): New declaration.
* lib/fmal.c: New file.
* m4/fmal.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whethern fmal is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAL, HAVE_FMAL, REPLACE_FMAL.
* modules/math (Makefile.am): Substitute GNULIB_FMAL, HAVE_FMAL,
REPLACE_FMAL.
* modules/fmal: New file.
* doc/posix-functions/fmal.texi: Mention the new module and the various
bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/math.in.h (fmaf): New declaration.
* lib/fmaf.c: New file.
* m4/fmaf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whethern fmaf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAF, HAVE_FMAF, REPLACE_FMAF.
* modules/math (Makefile.am): Substitute GNULIB_FMAF, HAVE_FMAF,
REPLACE_FMAF.
* modules/fmaf: New file.
* doc/posix-functions/fmaf.texi: Mention the new module and the various
bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/math.in.h (fma): New declaration.
* lib/fma.c: New file.
* m4/fma.m4: New file.
* m4/fegetround.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whethern fma is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMA, HAVE_FMA, REPLACE_FMA.
* modules/math (Makefile.am): Substitute GNULIB_FMA, HAVE_FMA,
REPLACE_FMA.
* modules/fma: New file.
* doc/posix-functions/fma.texi: Mention the new module and the various
bugs.
|
|
|
|
| |
* lib/openat.c: Include <stdbool.h>.
|
|
|
|
|
|
|
| |
* lib/openat.h: Don't include <dirent.h>; it's no longer needed,
and hasn't been needed ever since fdopendir was split into its own
module on 2009-08-31.
* modules/openat (Depends-on): Remove dirent.
|
|
|
|
|
| |
* lib/at-func2.c: Correct/improve first-line comment.
* lib/at-func.c: Correct grammar in first-line comment.
|
|
|
|
| |
* lib/closedir.c: Include <unistd.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
defined.
* m4/fstatat.m4: New file. extracted from m4/openat.m4.
* m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke
gl_FUNC_FSTATAT.
(gl_FUNC_FSTATAT): Moved to m4/fstatat.m4.
* modules/fstatat: New file, extracted from modules/openat.
* modules/openat (Files): Remove lib/fstatat.c.
(Depends-on): Remove lstat.
(configure.ac): Remove AC_LIBOBJ of fstatat.
* modules/fstatat-tests: New file, extracted from modules/openat-tests.
* modules/openat-tests (Files): Remove tests/test-fstatat.c,
tests/test-lstat.h, tests/test-stat.h.
(Depends-on): Remove getcwd-lgpl.
(Makefile.am): Remove rules for test-fstatat.
* doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead
of module 'openat'.
* NEWS: Mention the change.
* modules/getcwd (Depends-on): Add fstatat.
* modules/linkat (Depends-on): Likewise.
* modules/mkfifoat-tests (Depends-on): Likewise.
* modules/utimensat (Depends-on): Add fstatat. Remove openat.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/openat.h (chmodat, lchmodat): Enable only if GNULIB_FCHMODAT is
defined.
* m4/fchmodat.m4: New file, extracted from m4/openat.m4.
* m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHMODAT. Don't test
for fchmodat, lchmod. Don't set HAVE_FCHMODAT.
* modules/fchmodat: New file, extracted from modules/openat.
* modules/openat (Files): Remove lib/fchmodat.c.
(configure.ac): Remove AC_LIBOBJ of fchmodat.
* modules/fchmodat-tests: New file, extracted from modules/openat-tests.
* modules/openat-tests (Files): Remove tests/test-fchmodat.c.
(Makefile.am): Remove rules for test-fchmodat.
* doc/posix-functions/fchmodat.texi: Mention module 'fchmodat' instead
of module 'openat'.
* NEWS: Mention the change.
|
|
|
|
| |
* lib/putenv.c (environ): Make indentation reflect cpp nesting.
|
|
|
|
|
|
| |
* lib/alignof.h (alignof): Remove macro.
* NEWS: Mention the change.
Reported by Paul Eggert.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/openat.h (chownat, lchownat): Enable only if GNULIB_FCHOWNAT is
defined.
* m4/fchownat.m4: New file, extracted from m4/openat.m4.
* m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHOWNAT. Don't
invoke gl_FUNC_FCHOWNAT.
(gl_FUNC_FCHOWNAT_DEREF_BUG, gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG,
gl_FUNC_FCHOWNAT): Moved to m4/fchownat.m4.
* modules/fchownat: New file, extracted from modules/openat.
* modules/openat (Files): Remove lib/fchownat.c.
(Depends-on): Remove lchown.
(configure.ac): Remove AC_LIBOBJ of fchownat.
* modules/fchownat-tests: New file, extracted from modules/openat-tests.
* modules/openat-tests (Files): Remove tests/test-fchownat.c,
tests/test-chown.h, tests/test-lchown.h, tests/nap.h.
(Depends-on): Remove mgetgroups, usleep, stat-time.
(configure.ac): Remove test for getegid.
(Makefile.am): Remove rules for test-fchownat.
* doc/posix-functions/fchownat.texi: Mention module 'fchownat' instead
of module 'openat'.
* NEWS: Mention the change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think these problems were reported by Bruno Haible, in email
that I've unfortunately misplaced.
* doc/posix-headers/stdalign.texi (stdalign.h): Document more
shortcomings of MSVC and of Sun C 5.11.
* lib/stdalign.in.h (_Alignas): Omit bogus extra parenthesis
around __declspec arg.
* modules/stdalign-tests (Files): Add tests/macros.h.
* tests/test-stdalign.c: Do not include <stdlib.h>; no longer needed.
Include macros.h, for ASSERT.
(DECLARE_ALIGNED): Remove.
(TEST_ALIGNMENT): Define to 16 if alignment is supported (more likely
to catch bug), and to 1 if not (simplifies the rest of the code).
(CHECK_STATIC): Always declare the alignment test vars; that's simpler.
(CHECK_AUTO): Remove.
(CHECK_ALIGNED): Check only the alignment of the static vars,
since auto var alignment isn't supported by Sun C 5.11.
(CHECK_TYPES): Remove. All uses replaced by inline code, so that
ASSERT failures are easier to diagnose.
|
|
|
|
|
| |
* lib/ffsl.h: Include <config.h>.
Suggested by Tom G. Christensen <tgc@jupiterrise.com>.
|
| |
|
|
|
|
|
| |
* lib/sys_socket.in.h: Include <stdalign.h> instead of <alignof.h>.
* modules/sys_socket (Depends-on): Depend on stdalign, not alignof.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
Include <stdalign.h> and <stdint.h>. Do not include <stddef.h>.
Do not include <stdlib.h> twice, in md4.c.
(UNALIGNED_P): Simplify by using alignof. Use uintptr_t, not size_t,
because we are accessing a pointer's bit-pattern, not a size.
* modules/crypto/gc-md4 (Depends-on): Add stdalign.
* modules/crypto/gc-md5, modules/crypto/gc-sha1, modules/crypto/md4:
* modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
* modules/crypto/sha512: Likewise.
|
|
|
|
|
|
| |
* lib/argp-parse.c: Include <stdalign.h>.
(alignof): Remove.
* modules/argp (Depends-on): Add stdalign.
|
|
|
|
|
|
|
| |
* doc/posix-headers/stdalign.texi, lib/stdalign.in.h, m4/stdalign.m4:
* modules/stdalign: New files.
* MODULES.html.sh (c1x_core_properties): Add stdalign.
* doc/gnulib.texi (Header File Substitutes): Add stdalign.
|
|
|
|
|
|
| |
* lib/utimensat.c (rpl_utimensat) [Linux/hppa]: Reject invalid tv_nsec
values.
* doc/posix-functions/utimensat.texi: Mention the problem on Linux/hppa.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem: the fts-using "mkdir -p A/B; rm -rf A" would attempt to
unlink A, even though an FD open on A remained. This is suboptimal
(holding a file descriptor open longer than needed), but otherwise not
a problem on Unix-like kernels. However, on Cygwin with certain Novell
file systems, (see http://cygwin.com/ml/cygwin/2011-10/msg00365.html),
that represents a real problem: it causes the removal of A to fail
with e.g., "rm: cannot remove `A': Device or resource busy"
fts visits each directory twice and keeps a cache (fts_fd_ring) of
directory file descriptors. After completing the final, FTS_DP,
visit of a directory, RESTORE_INITIAL_CWD intended to clear the FD
cache, but then proceeded to add a new FD to it via the subsequent
FCHDIR (which calls cwd_advance_fd and i_ring_push). Before, the
final file descriptor would be closed only via fts_close's call to
fd_ring_clear. Now, it is usually closed earlier, via the final
FTS_DP-returning fts_read call.
* lib/fts.c (restore_initial_cwd): New function, converted from
the macro. Call fd_ring_clear *after* FCHDIR, not before it.
Update callers.
Reported by Franz Sirl via the above URL, with analysis by Eric Blake
in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/errno.in.h (GNULIB_defined_ETXTBSY): Remove macro.
(ENOMSG, EIDRM, ENOLINK, EPROTO, EBADMSG, EOVERFLOW, ENOTSUP,
ENETRESET, ECONNABORTED, ECANCELED, EINPROGRESS, EALREADY, ENOTSOCK,
EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT,
EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN,
ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT,
ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]:
Assign values compatible with MSVC 10.
(ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER):
New macros.
(GNULIB_defined_EWINSOCK): New macro.
* lib/strerror-override.c (strerror_override): Update accordingly.
* lib/strerror-override.h: Likewise.
* lib/w32sock.h (set_winsock_errno): Map those WSA* values that are no
longer equal to the corresponding errno value.
Reported by Michael Goffioul <michael.goffioul@gmail.com>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_1,
_GL_MATH_CXX_REAL_FLOATING_DECL_2): nEW MACROS.
(isfinite, isinf, isnan, signbit): In C++, define as overloaded
functions, not as a macro.
* tests/test-math-c++.cc (REAL_FLOATING_CHECK, OVERLOADED_CHECK): New
macros.
(isfinite, isinf, isnan, signbit): Check overloaded functions and
absence of macro.
Suggested by Eric Blake.
Reported by Michael Goffioul <michael.goffioul@gmail.com>.
|
|
|
|
|
|
|
| |
* lib/posix_openpt.c: Add comments about platforms, from lib/openpty.c.
* lib/openpty.c: Include <stdlib.h>.
(openpty): Use posix_openpt on all platforms except IRIX.
* modules/openpty (Depends-on): Add posix_openpt. Add conditions.
|
|
|
|
|
|
| |
* lib/unlockpt.c: Include <fcntl.h>.
(unlockpt): Check whether fd is valid, using fcntl().
* modules/unlockpt (Depends-on): Add fcntl-h.
|
|
|
|
| |
* lib/pty.in.h [AIX]: Include <sys/ioctl.h>, for 'struct winsize'.
|
|
|
|
|
|
|
|
| |
* lib/posix_openpt.c [OpenBSD]: Include <sys/ioctl.h>, <sys/tty.h>.
(posix_openpt) [OpenBSD]: New code.
* lib/grantpt.c: Include <fcntl.h>.
(grantpt) [OpenBSD]: Only test whether fd is valid, nothing else.
* modules/grantpt (Depends-on): Add fcntl-h.
|
|
|
|
| |
* lib/openpty.c: Add comments about Minix.
|
|
|
|
| |
* lib/posix_openpt.c (posix_openpt): Remove spurious #endif.
|
|
|
|
|
|
| |
* lib/posix_openpt.c (posix_openpt): Renamed from posix_openpty.
* doc/posix-functions/posix_openpt.texi: Mention ENOENT error code.
Mention the openpty module as an alternative.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write
'defined __STRICT_ANSI__', not '__STRICT_ANSI__'.
* lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise.
* lib/spawn.in.h (_Restrict_arr_): Likewise.
* lib/regex.h (_Restrict_arr_): Likewise.
* lib/regex_internal.h (re_token_t): Likewise.
* lib/regexec.c (check_node_accept_bytes): Likewise.
* tests/test-printf-posix.c (func1, func2, func3, func4): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modules/posix_openpt: New module.
* m4/posix_openpt.m4: New file.
* lib/posix_openpt.c: Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
(gl_STDLIB_H_DEFAULTS): Set defaults.
* modules/stdlib (Makefile.am): Substitute macros.
* lib/stdlib.in.h (posix_openpt): Declare.
* MODULES.html.sh (systems lacking POSIX:2008): Document it.
* doc/posix-functions/posix_openpt.texi (posix_openpt): Likewise.
* modules/posix_openpt-tests: New test module.
* tests/test-posix_openpt.c: New test.
|
|
|
|
|
|
|
|
| |
* lib/xstrtol.c (ULLONG_MAX, LLONG_MAX, LLONG_MIN): New macros, taken
from lib/strtol.c.
* doc/posix-headers/limits.texi: Mention missing numerical limits on
some platforms.
Reported by Tom G. Christensen <tgc@jupiterrise.com>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/vasnprintf.c (divide): Use optimizations from integer_length.c.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require
gl_DOUBLE_EXPONENT_LOCATION.
* modules/vasnprintf (Files): Add m4/exponentd.m4.
* modules/unistdio/u8-vasnprintf (Files): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
* modules/unistdio/u16-vasnprintf (Files): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
* modules/unistdio/u32-vasnprintf (Files): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
* modules/unistdio/ulc-vasnprintf (Files): Likewise.
* m4/isnand.m4 (gl_PREREQ_ISNAND): Use AC_REQUIRE.
|
|
|
|
| |
* lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.
|
|
|
|
|
| |
* lib/integer_length_ll.c: New file.
* modules/integer_length_ll: New file.
|
|
|
|
|
| |
* lib/integer_length_l.c: New file.
* modules/integer_length_l: New file.
|
|
|
|
|
|
| |
* lib/integer_length.h: New file.
* lib/integer_length.c: New file.
* modules/integer_length: New file.
|
|
|
|
|
| |
* lib/ffsl.h (FUNC): Omit a test from the last loop round. Do loop
unrolling.
|
|
|
|
|
| |
* lib/ffsl.h (FUNC): If TYPE has the same representation as 'int', just
use ffs() without a loop.
|
|
|
|
|
|
| |
* lib/ffsl.h (FUNC): Use GCC_BUILTIN if defined.
* lib/ffsl.c (GCC_BUILTIN): New macro.
* lib/ffsll.c (GCC_BUILTIN): Likewise.
|
|
|
|
|
|
| |
* lib/ffs.c: Include <config.h>.
* lib/bcopy.c: Likewise.
* lib/memset.c: Likewise.
|
|
|
|
|
|
|
|
| |
* lib/atanl.c (atanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
alternative implementation.
* m4/atanl.m4 (gl_FUNC_ATANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
Determine ATANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
* modules/atanl (Depends-on): Add atan. Update conditions.
|
|
|
|
|
|
|
|
| |
* lib/acosl.c (acosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
alternative implementation.
* m4/acosl.m4 (gl_FUNC_ACOSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
Determine ACOSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
* modules/acosl (Depends-on): Add acos. Update conditions.
|
|
|
|
|
|
|
|
| |
* lib/asinl.c (asinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
alternative implementation.
* m4/asinl.m4 (gl_FUNC_ASINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
Determine ASINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
* modules/asinl (Depends-on): Add asin. Update conditions.
|