annotate m4/dirent_h.m4 @ 14434:7624b26aea3d

sys_socket, netdb: Document problem with socklen_t. * doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some platforms. * doc/posix-headers/netdb.texi: Likewise.
author Bruno Haible <bruno@clisp.org>
date Sat, 19 Mar 2011 13:39:12 +0100
parents 97fc9a21a8fb
children f7f11056a86e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13508
abc6ebd285a3 dirfd: Avoid link error on AIX 7.1.
Bruno Haible <bruno@clisp.org>
parents: 13095
diff changeset
1 # dirent_h.m4 serial 13
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13508
diff changeset
2 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl Written by Bruno Haible.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_DEFUN([gl_DIRENT_H],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 dnl once only, before all statements that occur in other macros.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
12547
6d50d2a81c7d Further updates, following today's commits.
Bruno Haible <bruno@clisp.org>
parents: 12536
diff changeset
15 dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 gl_CHECK_NEXT_HEADERS([dirent.h])
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
17
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
18 dnl Check for declarations of anything we want to poison if the
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
19 dnl corresponding gnulib module is not in use.
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
20 gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
21 ]], [alphasort dirfd fdopendir scandir])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 ])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 dnl Unconditionally enables the replacement of <dirent.h>.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 AC_DEFUN([gl_REPLACE_DIRENT_H],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 [
12547
6d50d2a81c7d Further updates, following today's commits.
Bruno Haible <bruno@clisp.org>
parents: 12536
diff changeset
27 dnl This is a no-op, because <dirent.h> is always overridden.
12536
cd64e80f94e4 link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents: 12339
diff changeset
28 :
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 ])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12954
diff changeset
35 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
12954
b1a410092484 Tests of module 'dirent' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
36 dnl Define it also as a C macro, for the benefit of the unit tests.
13071
b2385e7b332e Distinguish two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 13066
diff changeset
37 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 ])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 AC_DEFUN([gl_DIRENT_H_DEFAULTS],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
43 GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
44 GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
45 GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
46 GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 dnl Assume proper GNU behavior unless another module says otherwise.
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
48 HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
13095
c47c56095752 fdopendir: work around FreeBSD bug
Eric Blake <eblake@redhat.com>
parents: 13071
diff changeset
49 HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
50 HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
51 HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
52 HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
53 REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
13508
abc6ebd285a3 dirfd: Avoid link error on AIX 7.1.
Bruno Haible <bruno@clisp.org>
parents: 13095
diff changeset
54 REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
55 REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
56 REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 ])