Mercurial > hg > octave-jordi > gnulib-hg
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 |
rev | line source |
---|---|
13066
fc8c984b0733
Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents:
12955
diff
changeset
|
1 # serial 12 |
7225 | 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 | 4 dnl This file is free software; the Free Software Foundation |
5 dnl gives unlimited permission to copy and/or distribute it, | |
6 dnl with or without modifications, as long as this notice is preserved. | |
7 | |
8 dnl Written by Paul Eggert. | |
9 | |
10 AC_DEFUN([gl_FCNTL_H], | |
11 [ | |
11482 | 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 | 23 AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], |
24 [ | |
25 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | |
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 | 30 ]) |
31 | |
32 AC_DEFUN([gl_FCNTL_H_DEFAULTS], | |
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 | 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 | 43 ]) |