annotate lib/sys_time.in.h @ 10375:f96e845fc36d

Avoid some "gcc -pedantic" warnings.
author Bruno Haible <bruno@clisp.org>
date Sat, 30 Aug 2008 03:09:15 +0200
parents a553c18c572d
children 8668b19a7032
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9268
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Provide a more complete sys/time.h.
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9268
diff changeset
3 Copyright (C) 2007-2008 Free Software Foundation, Inc.
9268
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 /* Written by Paul Eggert. */
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9268
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9268
diff changeset
22
9268
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 #if defined _GL_SYS_TIME_H
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 /* Simply delegate to the system's header, without adding anything. */
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 # if @HAVE_SYS_TIME_H@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 # endif
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 #else
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 # define _GL_SYS_TIME_H
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 # if @HAVE_SYS_TIME_H@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 # else
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 # include <time.h>
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 # endif
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 # if ! @HAVE_STRUCT_TIMEVAL@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 struct timeval
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 {
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 time_t tv_sec;
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 long int tv_usec;
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 };
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 # endif
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 # if @REPLACE_GETTIMEOFDAY@
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 # undef gettimeofday
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 # define gettimeofday rpl_gettimeofday
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 int gettimeofday (struct timeval *restrict, void *restrict);
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 # endif
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53
a553c18c572d Rename sys_time_.h to sys_time.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #endif /* _GL_SYS_TIME_H */