annotate m4/fcntl_h.m4 @ 13066:fc8c984b0733

Factorize common .m4 code.
author Bruno Haible <bruno@clisp.org>
date Sat, 27 Mar 2010 18:38:53 +0100
parents ea8792098af0
children b2385e7b332e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12955
diff changeset
1 # serial 12
7225
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2 # Configure fcntl.h.
12559
c2cbabec01dd update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents: 12502
diff changeset
3 dnl Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
7225
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 dnl This file is free software; the Free Software Foundation
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5 dnl gives unlimited permission to copy and/or distribute it,
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6 dnl with or without modifications, as long as this notice is preserved.
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8 dnl Written by Paul Eggert.
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
10 AC_DEFUN([gl_FCNTL_H],
3307ae6ea2e5 * lib/fcntl_.h: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 [
11482
5ff04014c57f Tweak last commit.
Bruno Haible <bruno@clisp.org>
parents: 11479
diff changeset
12 AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
12180
2c71cf09ef7e Avoid symlink attack in localcharset module.
Bruno Haible <bruno@clisp.org>
parents: 12051
diff changeset
13 AC_REQUIRE([gl_FCNTL_O_FLAGS])
2c71cf09ef7e Avoid symlink attack in localcharset module.
Bruno Haible <bruno@clisp.org>
parents: 12051
diff changeset
14 gl_CHECK_NEXT_HEADERS([fcntl.h])
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
15
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
16 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
17 dnl corresponding gnulib module is not in use, if it is not common
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
18 dnl enough to be declared everywhere.
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
19 gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
20 ]], [fcntl openat])
12180
2c71cf09ef7e Avoid symlink attack in localcharset module.
Bruno Haible <bruno@clisp.org>
parents: 12051
diff changeset
21 ])
2c71cf09ef7e Avoid symlink attack in localcharset module.
Bruno Haible <bruno@clisp.org>
parents: 12051
diff changeset
22
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
23 AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
24 [
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
25 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
26 AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12955
diff changeset
27 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
12955
ea8792098af0 Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
28 dnl Define it also as a C macro, for the benefit of the unit tests.
ea8792098af0 Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
29 gl_MODULE_INDICATOR([$1])
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
30 ])
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
31
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
32 AC_DEFUN([gl_FCNTL_H_DEFAULTS],
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
33 [
12454
f7624052e60d fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
34 GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
12047
21ec8b9a3f27 openat: fix openat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 11966
diff changeset
35 GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
21ec8b9a3f27 openat: fix openat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 11966
diff changeset
36 GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
37 dnl Assume proper GNU behavior unless another module says otherwise.
12456
f3aceada3c52 fcntl: port portions of fcntl to mingw
Eric Blake <ebb9@byu.net>
parents: 12454
diff changeset
38 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
12047
21ec8b9a3f27 openat: fix openat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 11966
diff changeset
39 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
12454
f7624052e60d fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
40 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
12047
21ec8b9a3f27 openat: fix openat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 11966
diff changeset
41 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
21ec8b9a3f27 openat: fix openat bugs on Solaris 9
Eric Blake <ebb9@byu.net>
parents: 11966
diff changeset
42 REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 8995
diff changeset
43 ])