annotate modules/unistd @ 40214:452ab00796c7

Fix undefined behaviour. * lib/bitrotate.h (rotl16, rotr16, rotl8, rotr8): Case x to 'unsigned int', to avoid shift operations on 'int'. * lib/xmemdup0.c (xmemdup0): Don't invoke memcpy with a zero size. * tests/test-count-leading-zeros.c (main): Use a random number that has as many bits as TYPE, not only 2*15 or 2*31 bits. * tests/test-count-trailing-zeros.c (main): Likewise. * tests/test-count-one-bits.c (main): Likewise. * tests/test-memmem.c: Don't include "null-ptr.h". (main): Use zerosize_ptr() instead of null_ptr(). * modules/memmem-tests (Files): Remove tests/null-ptr.h.
author Bruno Haible <bruno@clisp.org>
date Sat, 09 Mar 2019 20:32:25 +0100
parents b0ba15e72c3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
1 Description:
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
2 A GNU-like <unistd.h>.
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
3
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
4 Files:
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
5 m4/unistd_h.m4
17174
263910906d80 unistd: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16817
diff changeset
6 lib/unistd.c
9271
56962d28d442 Rename unistd_.h to unistd.in.h.
Bruno Haible <bruno@clisp.org>
parents: 9102
diff changeset
7 lib/unistd.in.h
16817
7747cb9b54b9 unistd_h: make it easier to avoid sys_types_h
Paul Eggert <eggert@cs.ucla.edu>
parents: 16795
diff changeset
8 m4/off_t.m4
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
9
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
10 Depends-on:
17174
263910906d80 unistd: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16817
diff changeset
11 extern-inline
8995
1025663f7658 * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents: 8982
diff changeset
12 include_next
15415
768296dab89a Rename module 'arg-nonnull' to 'snippet/arg-nonnull'.
Bruno Haible <bruno@clisp.org>
parents: 14894
diff changeset
13 snippet/arg-nonnull
15416
10b35faca629 Rename module 'c++defs' to 'snippet/c++defs'.
Bruno Haible <bruno@clisp.org>
parents: 15415
diff changeset
14 snippet/c++defs
15419
d2437ed29d20 Rename module 'warn-on-use' to 'snippet/warn-on-use'.
Bruno Haible <bruno@clisp.org>
parents: 15416
diff changeset
15 snippet/warn-on-use
15620
04a6b94f5530 Support for MSVC compiler: Ensure ssize_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 15419
diff changeset
16 ssize_t
11832
ff3dd373542b stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents: 11810
diff changeset
17 stddef
16795
6a9ea5d7b466 Large File Support for native Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 16209
diff changeset
18 sys_types
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
19
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
20 configure.ac:
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
21 gl_UNISTD_H
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
22
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
23 Makefile.am:
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
24 BUILT_SOURCES += unistd.h
17174
263910906d80 unistd: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16817
diff changeset
25 lib_SOURCES += unistd.c
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
26
6689
93d578c7aa44 * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
Paul Eggert <eggert@cs.ucla.edu>
parents: 6687
diff changeset
27 # We need the following in order to create an empty placeholder for
93d578c7aa44 * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
Paul Eggert <eggert@cs.ucla.edu>
parents: 6687
diff changeset
28 # <unistd.h> when the system doesn't have one.
14527
049942251f65 Ensure to rebuild generated .h files when config.status has changed.
Bruno Haible <bruno@clisp.org>
parents: 14316
diff changeset
29 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
11868
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11832
diff changeset
30 $(AM_V_GEN)rm -f $@-t $@ && \
7421
8bace4b08db5 Mark generated files as "DO NOT EDIT".
Bruno Haible <bruno@clisp.org>
parents: 6689
diff changeset
31 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14733
diff changeset
32 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14733
diff changeset
33 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9721
diff changeset
34 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9721
diff changeset
35 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
13761
a19ace3ba849 Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents: 13314
diff changeset
36 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
8995
1025663f7658 * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents: 8982
diff changeset
37 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
16795
6a9ea5d7b466 Large File Support for native Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 16209
diff changeset
38 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
15746
60062069d7ed New module 'chdir'.
Bruno Haible <bruno@clisp.org>
parents: 15625
diff changeset
39 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
40 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
41 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
15760
45b9be95a543 New module 'dup'.
Bruno Haible <bruno@clisp.org>
parents: 15746
diff changeset
42 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
43 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
44 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
45 -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
46 -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
47 -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
48 -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
49 -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
15622
814138b4cfed fdatasync: new module
Eric Blake <eblake@redhat.com>
parents: 15620
diff changeset
50 -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
51 -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
52 -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
53 -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
54 -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
55 -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
56 -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
57 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
58 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
59 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
60 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
39799
b0ba15e72c3c getpass: Move declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 19668
diff changeset
61 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
62 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
63 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
16209
93b0d3ad505e New module 'isatty'.
Bruno Haible <bruno@clisp.org>
parents: 16147
diff changeset
64 -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
65 -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
66 -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
67 -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
68 -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
69 -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
70 -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
71 -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
72 -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
73 -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
74 -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
75 -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
76 -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
16146
caaefe18d91b Integrate the sethostname module into unistd
Ben Walton <bwalton@artsci.utoronto.ca>
parents: 16122
diff changeset
77 -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
78 -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
79 -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
80 -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
18898
4d39b2c5c705 truncate: New module.
Bruno Haible <bruno@clisp.org>
parents: 18573
diff changeset
81 -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
82 -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
16122
e3e8e2fc21a9 Fix conflict between two instantiations of module 'unistd'.
Bruno Haible <bruno@clisp.org>
parents: 15760
diff changeset
83 -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT)/g' \
14894
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
84 -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
85 -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
86 -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
87 -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
88 -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
b22360ddefc4 gnulib-tool: Better isolation between different gnulib-tool invocations.
Bruno Haible <bruno@clisp.org>
parents: 14840
diff changeset
89 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
12742
eb23650d64e1 Split large sed scripts, for HP-UX sed.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 12725
diff changeset
90 < $(srcdir)/unistd.in.h | \
eb23650d64e1 Split large sed scripts, for HP-UX sed.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 12725
diff changeset
91 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
92 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
11886
3ac76948db10 New module 'dup3'.
Bruno Haible <bruno@clisp.org>
parents: 11870
diff changeset
93 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
10662
ad36db29dad7 Move the euidaccess() declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 10661
diff changeset
94 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
11945
2cf208dc022b faccessat: new module
Eric Blake <ebb9@byu.net>
parents: 11942
diff changeset
95 -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
13125
e3ca987c9a94 fchdir: Fix regression introduced on 2010-03-08.
Bruno Haible <bruno@clisp.org>
parents: 13124
diff changeset
96 -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
11942
d1047ae4b8d5 openat: declare in POSIX headers
Eric Blake <ebb9@byu.net>
parents: 11886
diff changeset
97 -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
15622
814138b4cfed fdatasync: new module
Eric Blake <eblake@redhat.com>
parents: 15620
diff changeset
98 -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
10565
6dd4cb5e376f fsync: new module
Richard W.M. Jones <rjones@redhat.com>
parents: 10498
diff changeset
99 -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
100 -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
10582
738187526552 New module 'getdtablesize'.
Bruno Haible <bruno@clisp.org>
parents: 10565
diff changeset
101 -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
12279
6a41b8f5f874 getgroups, getugroups: provide stubs for mingw
Eric Blake <ebb9@byu.net>
parents: 12120
diff changeset
102 -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
10692
b867b19bccb3 Add gethostname() declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 10666
diff changeset
103 -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
9498
a2c450a3023c Move declaration of getpagesize() from getpagesize.h to unistd.h.
Bruno Haible <bruno@clisp.org>
parents: 9276
diff changeset
104 -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
39799
b0ba15e72c3c getpass: Move declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 19668
diff changeset
105 -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
14733
8d8a6d8151f4 group-member: Declare function in <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 14583
diff changeset
106 -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
12290
7e3695d9b328 lchown: detect Solaris and FreeBSD bug
Eric Blake <ebb9@byu.net>
parents: 12289
diff changeset
107 -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
11041
894d336e6216 New module 'link'.
Martin Lambers <marlam@marlam.de>
parents: 10692
diff changeset
108 -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
12068
14cddb59cb05 linkat: new module
Eric Blake <ebb9@byu.net>
parents: 12058
diff changeset
109 -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
13925
29a686188651 pipe-posix: Make it work in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 13923
diff changeset
110 -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
11870
ddd29d8cdded New module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents: 11868
diff changeset
111 -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
12355
9961377da68e pread: new module
Jim Meyering <meyering@redhat.com>
parents: 12326
diff changeset
112 -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
13314
d44fde85189e New module pwrite.
Peter O'Gorman <pogma@thewrittenword.com>
parents: 13266
diff changeset
113 -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
114 -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
11956
55cb5282dd84 symlinkat: new module
Eric Blake <ebb9@byu.net>
parents: 11945
diff changeset
115 -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
16147
9b09933df0d5 Tweak last commit.
Bruno Haible <bruno@clisp.org>
parents: 16146
diff changeset
116 -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
8786
b7c6961fb530 New module 'sleep'.
Bruno Haible <bruno@clisp.org>
parents: 8199
diff changeset
117 -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
12056
e0c5d88f8c3b symlink: new module, for Solaris 9 bug
Eric Blake <ebb9@byu.net>
parents: 12045
diff changeset
118 -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
11956
55cb5282dd84 symlinkat: new module
Eric Blake <ebb9@byu.net>
parents: 11945
diff changeset
119 -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
11942
d1047ae4b8d5 openat: declare in POSIX headers
Eric Blake <ebb9@byu.net>
parents: 11886
diff changeset
120 -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
12315
8cb02ee162a1 usleep: new module
Eric Blake <ebb9@byu.net>
parents: 12290
diff changeset
121 -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
9721
1d443a80afc4 New module 'environ'.
Bruno Haible <bruno@clisp.org>
parents: 9552
diff changeset
122 -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
13941
8a75c6738522 fchdir: Add missing declaration on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 13925
diff changeset
123 -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
15625
eab059ee71cc fdatasync: port to MacOS X 10.7
Eric Blake <eblake@redhat.com>
parents: 15622
diff changeset
124 -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
13911
e6744cae0421 getdomainname: Use the system function when possible.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
125 -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
18573
95dafdf1f863 getlogin: Port to newer mingw.
Bruno Haible <bruno@clisp.org>
parents: 17770
diff changeset
126 -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
127 -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
13124
69f0d92b5794 getpagesize: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents: 13023
diff changeset
128 -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
13010
23b6d428ea53 getusershell: Provide declaration, missing on Solaris 9.
Bruno Haible <bruno@clisp.org>
parents: 12949
diff changeset
129 -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
16146
caaefe18d91b Integrate the sethostname module into unistd
Ben Walton <bwalton@artsci.utoronto.ca>
parents: 16122
diff changeset
130 -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
19668
0fdf358c9224 truncate: Fix compilation error on Android.
Bruno Haible <bruno@clisp.org>
parents: 19437
diff changeset
131 -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \
13967
c0afec342ca5 ttyname_r: Add missing declaration on HP-UX 11.
Bruno Haible <bruno@clisp.org>
parents: 13941
diff changeset
132 -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
9498
a2c450a3023c Move declaration of getpagesize() from getpagesize.h to unistd.h.
Bruno Haible <bruno@clisp.org>
parents: 9276
diff changeset
133 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
a2c450a3023c Move declaration of getpagesize() from getpagesize.h to unistd.h.
Bruno Haible <bruno@clisp.org>
parents: 9276
diff changeset
134 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
14316
6f2788453d27 Split large sed scripts, for HP-UX sed.
Bruno Haible <bruno@clisp.org>
parents: 14273
diff changeset
135 | \
6f2788453d27 Split large sed scripts, for HP-UX sed.
Bruno Haible <bruno@clisp.org>
parents: 14273
diff changeset
136 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
10609
5acc60c1ec66 New module 'close'.
Paolo Bonzini <bonzini@gnu.org>
parents: 10582
diff changeset
137 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
11992
a1e0b2efc812 fchdir: improve use of replacement functions
Eric Blake <ebb9@byu.net>
parents: 11981
diff changeset
138 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
11726
c694fa3f9d7d dup2: work around mingw and cygwin 1.5 bug
Eric Blake <ebb9@byu.net>
parents: 11041
diff changeset
139 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
19437
23bf293630c0 faccessat: port to macOS (Bug#29231)
Paul Eggert <eggert@cs.ucla.edu>
parents: 18898
diff changeset
140 -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
11942
d1047ae4b8d5 openat: declare in POSIX headers
Eric Blake <ebb9@byu.net>
parents: 11886
diff changeset
141 -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
16795
6a9ea5d7b466 Large File Support for native Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 16209
diff changeset
142 -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
8199
51d32a83a7df Move more declarations into <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 7865
diff changeset
143 -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
13911
e6744cae0421 getdomainname: Use the system function when possible.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
144 -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
17497
52cc408447aa getdtablesize: work around cygwin issue
Eric Blake <eblake@redhat.com>
parents: 17174
diff changeset
145 -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
13999
f4f90f0b7167 getlogin_r: Work around portability problem on OSF/1.
Bruno Haible <bruno@clisp.org>
parents: 13967
diff changeset
146 -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
12279
6a41b8f5f874 getgroups, getugroups: provide stubs for mingw
Eric Blake <ebb9@byu.net>
parents: 12120
diff changeset
147 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
9552
6632990b0812 Override getpagesize on mingw.
Martin Lambers <marlam@marlam.de>
parents: 9498
diff changeset
148 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
39799
b0ba15e72c3c getpass: Move declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 19668
diff changeset
149 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
16209
93b0d3ad505e New module 'isatty'.
Bruno Haible <bruno@clisp.org>
parents: 16147
diff changeset
150 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
8982
04a20e8bea33 Revamp lchown so that it lives in unistd.h where it belongs.
Paul Eggert <eggert@cs.ucla.edu>
parents: 8872
diff changeset
151 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
11981
7e5f9267c62e link: fix platform bugs
Eric Blake <ebb9@byu.net>
parents: 11967
diff changeset
152 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
12120
0bc26baea4bf linkat: support Linux 2.6.17
Eric Blake <ebb9@byu.net>
parents: 12068
diff changeset
153 -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
8872
dfee3b4fd46c Fix lseek on mingw.
Eric Blake <ebb9@byu.net>
parents: 8825
diff changeset
154 -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
12355
9961377da68e pread: new module
Jim Meyering <meyering@redhat.com>
parents: 12326
diff changeset
155 -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
13314
d44fde85189e New module pwrite.
Peter O'Gorman <pogma@thewrittenword.com>
parents: 13266
diff changeset
156 -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
14583
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14578
diff changeset
157 -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
12058
36183b482b71 readlink: fix cygwin 1.5.x bug with return type
Eric Blake <ebb9@byu.net>
parents: 12056
diff changeset
158 -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
17769
05d77e098e6e readlinkat: port to AIX 7.1
Paul Eggert <eggert@cs.ucla.edu>
parents: 17497
diff changeset
159 -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
11993
767d867147de rmdir: work around cygwin 1.5.x and mingw bugs
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
160 -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
12326
25e64e77bb53 sleep: work around cygwin bug
Eric Blake <ebb9@byu.net>
parents: 12315
diff changeset
161 -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
12056
e0c5d88f8c3b symlink: new module, for Solaris 9 bug
Eric Blake <ebb9@byu.net>
parents: 12045
diff changeset
162 -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
17770
a0a111d28e75 symlinkat: port to AIX 7.1
Paul Eggert <eggert@cs.ucla.edu>
parents: 17769
diff changeset
163 -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
18898
4d39b2c5c705 truncate: New module.
Bruno Haible <bruno@clisp.org>
parents: 18573
diff changeset
164 -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
13266
ddd7bebf854c ttyname_r: Make it work on MacOS X 10.4 and Solaris 10.
Bruno Haible <bruno@clisp.org>
parents: 13125
diff changeset
165 -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
12040
e8108d5c7ca7 unlink: new module, for Solaris 9 bug
Eric Blake <ebb9@byu.net>
parents: 12008
diff changeset
166 -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
12045
2bd4d1ff29e9 openat: fix unlinkat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 12040
diff changeset
167 -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
12315
8cb02ee162a1 usleep: new module
Eric Blake <ebb9@byu.net>
parents: 12290
diff changeset
168 -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
10484
b763245277c9 New module 'write'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
169 -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
10610
9202c6340cce Combine the two replacements of 'close'.
Paolo Bonzini <bonzini@gnu.org>
parents: 10609
diff changeset
170 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
11801
a29d6bab4448 Make it possible to use module 'gethostname' without module 'close' or 'ioctl'.
Bruno Haible <bruno@clisp.org>
parents: 11726
diff changeset
171 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
12949
a30dc7c28962 unistd: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
172 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12410
diff changeset
173 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
12742
eb23650d64e1 Split large sed scripts, for HP-UX sed.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents: 12725
diff changeset
174 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
11868
67c2b22aff08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents: 11832
diff changeset
175 } > $@-t && \
7863
cb2590895141 New module 'fchdir'.
Bruno Haible <bruno@clisp.org>
parents: 7421
diff changeset
176 mv $@-t $@
cb2590895141 New module 'fchdir'.
Bruno Haible <bruno@clisp.org>
parents: 7421
diff changeset
177 MOSTLYCLEANFILES += unistd.h unistd.h-t
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
178
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
179 Include:
12008
18ea6ab4e81d maint: make Include sections of modules consistent
Eric Blake <ebb9@byu.net>
parents: 11993
diff changeset
180 <unistd.h>
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
181
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
182 License:
9102
404dc8725caf Use the synonymous term LGPLv2.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
183 LGPLv2+
6685
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
184
143f906c9a6a Fix use of unistd.h in getopt through a new unistd module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
185 Maintainer:
8995
1025663f7658 * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents: 8982
diff changeset
186 all