view modules/dirent @ 10663:2b0380d48ff6

Move the dirfd() declaration to <dirent.h>.
author Bruno Haible <bruno@clisp.org>
date Sun, 19 Oct 2008 12:47:52 +0200
parents fb8bcb95d71a
children 6c37790abb93
line wrap: on
line source

Description:
A GNU-like <dirent.h>.

Files:
lib/dirent.in.h
m4/dirent_h.m4
m4/unistd_h.m4

Depends-on:
include_next
link-warning

configure.ac:
gl_DIRENT_H

Makefile.am:
BUILT_SOURCES += $(DIRENT_H)

# We need the following in order to create <dirent.h> when the system
# doesn't have one that works with the given compiler.
dirent.h: dirent.in.h
	rm -f $@-t $@
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
	      -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
	      -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \
	      -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
	      -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
	      -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
	      < $(srcdir)/dirent.in.h; \
	} > $@-t
	mv $@-t $@
MOSTLYCLEANFILES += dirent.h dirent.h-t

Include:
#include <dirent.h>

License:
LGPLv2+

Maintainer:
all