* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
[gnulib.git] / modules / unistd
1 Description:
2 A GNU-like <unistd.h>.
3
4 Files:
5 m4/unistd_h.m4
6 lib/unistd_.h
7
8 Depends-on:
9 include_next
10 link-warning
11
12 configure.ac:
13 gl_UNISTD_H
14
15 Makefile.am:
16 BUILT_SOURCES += unistd.h
17
18 # We need the following in order to create an empty placeholder for
19 # <unistd.h> when the system doesn't have one.
20 unistd.h: unistd_.h
21         rm -f $@-t $@
22         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
23           sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
24               -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
25               -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
26               -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
27               -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
28               -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
29               -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
30               -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
31               -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
32               -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
33               -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
34               -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
35               -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
36               -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
37               -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
38               -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
39               -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
40               -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
41               -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
42               -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
43               -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
44               -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
45               -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
46               < $(srcdir)/unistd_.h; \
47         } > $@-t
48         mv $@-t $@
49 MOSTLYCLEANFILES += unistd.h unistd.h-t
50
51 Include:
52 #include <unistd.h>
53
54 License:
55 LGPL
56
57 Maintainer:
58 all