Mercurial > hg > octave-kai > gnulib-hg
annotate tests/test-fcntl-h-c++.cc @ 14350:4cf3b58aaf12
Don't interfere with a program's definition of __attribute__.
* lib/argp.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(argp_error, __argp_error, argp_failure, __argp_failure): Use it.
* lib/argp-fmtstream.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
* lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
GCC 3 or newer.
* lib/error.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(error, error_at_line): Use it.
* lib/hash.h (__attribute__): Remove definition.
(ATTRIBUTE_WUR): Update definition. Define always.
* lib/openat.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/sigpipe-die.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/vasnprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(asnprintf, vasnprintf): Use it.
* lib/xalloc.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
* lib/xmemdup0.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/xprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(xprintf, xvprintf, xfprintf, xvfprintf): Use it.
* lib/xstrtol.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/xvasprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(xasprintf, xvasprintf): Use it.
* tests/test-argmatch.c (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* tests/test-exclude.c (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
Reported by Paul Eggert.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 13 Feb 2011 23:21:20 +0100 |
parents | 97fc9a21a8fb |
children | 8250f2777afc |
rev | line source |
---|---|
12955
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Test of <fcntl.h> substitute in C++ mode. |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
13073
diff
changeset
|
2 Copyright (C) 2010-2011 Free Software Foundation, Inc. |
12955
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 (at your option) any later version. |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */ |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #define GNULIB_NAMESPACE gnulib |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #include <config.h> |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 #include <fcntl.h> |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 #include "signature.h" |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12955
diff
changeset
|
27 #if GNULIB_TEST_FCNTL |
12955
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::fcntl, int, (int, int, ...)); |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 #endif |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12955
diff
changeset
|
31 #if GNULIB_TEST_OPEN |
12955
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::open, int, (const char *, int, ...)); |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 #endif |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12955
diff
changeset
|
35 #if GNULIB_TEST_OPENAT |
12955
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::openat, int, (int, char const *, int, ...)); |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 #endif |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 int |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 main () |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 { |
ea8792098af0
Tests of module 'fcntl-h' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 } |