annotate tests/test-fopen.c @ 16616:2f2ef742aa4b

New module 'exp2'. * lib/math.in.h (exp2): New declaration. * lib/exp2.c: New file. * m4/exp2.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2, REPLACE_EXP2. * modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2, REPLACE_EXP2. * modules/exp2: New file. * tests/test-math-c++.cc: Check the declaration of exp2. * doc/posix-functions/exp2.texi: Mention the new module and the IRIX and OpenBSD problems.
author Bruno Haible <bruno@clisp.org>
date Wed, 07 Mar 2012 03:29:32 +0100
parents 8250f2777afc
children e542fd46ad6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9302
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of opening a file stream.
16201
8250f2777afc maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
2 Copyright (C) 2007-2012 Free Software Foundation, Inc.
9302
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9302
diff changeset
4 This program is free software: you can redistribute it and/or modify
9302
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9302
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9302
diff changeset
7 (at your option) any later version.
9302
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9302
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
9302
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #include <config.h>
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include <stdio.h>
e0a1dcc13fb9 Test for module 'fopen'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
12489
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12197
diff changeset
23 #include "signature.h"
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12197
diff changeset
24 SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12197
diff changeset
25
12105
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
26 #define BASE "test-fopen.t"
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
27
11861
f455bec0d65f test-fopen-safer: split from test-fopen
Eric Blake <ebb9@byu.net>
parents: 11849
diff changeset
28 #include "test-fopen.h"
12105
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
29
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
30 int
12197
e45d9bb2233e tests: avoid several compiler warnings
Eric Blake <ebb9@byu.net>
parents: 12105
diff changeset
31 main (void)
12105
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
32 {
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
33 return test_fopen ();
edba99785b75 test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents: 11861
diff changeset
34 }