Mercurial > hg > octave-kai > gnulib-hg
annotate tests/test-time-c++.cc @ 17082:62741e75b7c5
poll/select: document portability problems not fixed by Gnulib.
* doc/posix-functions/poll.texi: poll does not work well on
pipes under Windows. It has the same limitations as select on
BeOS.
* doc/posix-functions/select.texi: select does not work well
on pipes under Windows.
author | Paolo Bonzini <pbonzini@redhat.com> |
---|---|
date | Thu, 13 Sep 2012 08:51:16 +0200 |
parents | 8250f2777afc |
children | e542fd46ad6f |
rev | line source |
---|---|
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Test of <time.h> substitute in C++ mode. |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
2 Copyright (C) 2010-2012 Free Software Foundation, Inc. |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
ad47f1c31ded
Tests of module 'time' 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 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 (at your option) any later version. |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */ |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #define GNULIB_NAMESPACE gnulib |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #include <config.h> |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 #include <time.h> |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 #include "signature.h" |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 |
ad47f1c31ded
Tests of module 'time' 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:
12992
diff
changeset
|
27 #if GNULIB_TEST_NANOSLEEP |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::nanosleep, int, |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 (struct timespec const *, struct timespec *)); |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 #endif |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12992
diff
changeset
|
32 #if GNULIB_TEST_MKTIME |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime, time_t, (struct tm *)); |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 #endif |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12992
diff
changeset
|
36 #if GNULIB_TEST_TIME_R |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_r, struct tm *, |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 (time_t const *, struct tm *)); |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime_r, struct tm *, |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 (time_t const *, struct tm *)); |
12992
4ca54426154c
Fix compilation error on mingw when module 'time_r' is not used.
Bruno Haible <bruno@clisp.org>
parents:
12972
diff
changeset
|
42 #endif |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12992
diff
changeset
|
44 #if GNULIB_TEST_STRPTIME |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 SIGNATURE_CHECK (GNULIB_NAMESPACE::strptime, char *, |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 (char const *, char const *, struct tm *)); |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 #endif |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 |
13073
03de1efbfdd3
Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
12992
diff
changeset
|
49 #if GNULIB_TEST_TIMEGM |
12972
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 SIGNATURE_CHECK (GNULIB_NAMESPACE::timegm, time_t, (struct tm *)); |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 #endif |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 int |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 main () |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 { |
ad47f1c31ded
Tests of module 'time' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 } |