fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
[gnulib.git] / modules / fcntl-h
1 Description:
2 Like <fcntl.h>, but with non-working flags defined to 0.
3
4 Files:
5 lib/fcntl.in.h
6 m4/fcntl_h.m4
7
8 Depends-on:
9 include_next
10 link-warning
11 arg-nonnull
12 unistd
13 extensions
14
15 configure.ac:
16 gl_FCNTL_H
17
18 Makefile.am:
19 BUILT_SOURCES += fcntl.h
20
21 # We need the following in order to create <fcntl.h> when the system
22 # doesn't have one that works with the given compiler.
23 fcntl.h: fcntl.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
24         $(AM_V_GEN)rm -f $@-t $@ && \
25         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
26           sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
27               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
28               -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
29               -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
30               -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
31               -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
32               -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
33               -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
34               -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
35               -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
36               -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
37               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
38               < $(srcdir)/fcntl.in.h; \
39         } > $@-t && \
40         mv $@-t $@
41 MOSTLYCLEANFILES += fcntl.h fcntl.h-t
42
43 Include:
44 <fcntl.h>
45
46 License:
47 LGPL
48
49 Maintainer:
50 all