25 BUILT_SOURCES += unistd.h
26 lib_SOURCES += unistd.c
28 # We need the following in order to create an empty placeholder for
29 # <unistd.h> when the system doesn't have one.
30 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
31 $(AM_V_GEN)rm -f $@-t $@ && \
32 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
33 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
34 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
35 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
36 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
37 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
38 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
39 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
40 -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
41 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
42 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
43 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
44 -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \
45 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
46 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
47 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
48 -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
49 -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
50 -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
51 -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
52 -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
53 -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
54 -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
55 -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
56 -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
57 -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
58 -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
59 -e 's/@''GNULIB_GETENTROPY''@/$(GNULIB_GETENTROPY)/g' \
60 -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
61 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
62 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
63 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
64 -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
65 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
66 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
67 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
68 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
69 -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
70 -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
71 -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
72 -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
73 -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
74 -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
75 -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
76 -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
77 -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
78 -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
79 -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
80 -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
81 -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
82 -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
83 -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
84 -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
85 -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
86 -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
87 -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
88 -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT)/g' \
89 -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
90 -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
91 -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
92 -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
93 -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
94 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
95 < $(srcdir)/unistd.in.h | \
96 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
97 -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
98 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
99 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
100 -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
101 -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
102 -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
103 -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
104 -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
105 -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
106 -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
107 -e 's|@''HAVE_GETENTROPY''@|$(HAVE_GETENTROPY)|g' \
108 -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
109 -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
110 -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
111 -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
112 -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
113 -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
114 -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
115 -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
116 -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
117 -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
118 -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
119 -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
120 -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
121 -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
122 -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
123 -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
124 -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
125 -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
126 -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
127 -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
128 -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
129 -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
130 -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
131 -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
132 -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
133 -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
134 -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
135 -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
136 -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
137 -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \
138 -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
139 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
140 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
142 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
143 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
144 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
145 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
146 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
147 -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
148 -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
149 -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
150 -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
151 -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
152 -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
153 -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
154 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
155 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
156 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
157 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
158 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
159 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
160 -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
161 -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
162 -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
163 -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
164 -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
165 -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
166 -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
167 -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
168 -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
169 -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
170 -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
171 -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
172 -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
173 -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
174 -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
175 -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
176 -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
177 -e 's|@''UNISTD_H_HAVE_SYS_RANDOM_H''@|$(UNISTD_H_HAVE_SYS_RANDOM_H)|g' \
178 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
179 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
180 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
181 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
182 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
185 MOSTLYCLEANFILES += unistd.h unistd.h-t