floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
[gnulib.git] / lib / sys_times.in.h
blobd684ea06f7c94e590b8bc2758c34b19337e6d31c
1 /* Provide a sys/times.h header file.
2 Copyright (C) 2008-2018 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
19 /* This file is supposed to be used on platforms where <sys/times.h>
20 is missing. */
22 #ifndef _@GUARD_PREFIX@_SYS_TIMES_H
24 # if __GNUC__ >= 3
25 @PRAGMA_SYSTEM_HEADER@
26 # endif
27 @PRAGMA_COLUMNS@
29 # if @HAVE_SYS_TIMES_H@
30 # @INCLUDE_NEXT@ @NEXT_SYS_TIMES_H@
31 # endif
33 # define _@GUARD_PREFIX@_SYS_TIMES_H
35 /* Get clock_t.
36 But avoid namespace pollution on glibc systems. */
37 # ifndef __GLIBC__
38 # include <time.h>
39 # endif
41 /* The definition of _GL_ARG_NONNULL is copied here. */
43 /* The definition of _GL_WARN_ON_USE is copied here. */
45 # ifdef __cplusplus
46 extern "C" {
47 # endif
49 # if !@HAVE_STRUCT_TMS@
50 # if !GNULIB_defined_struct_tms
51 /* Structure describing CPU time used by a process and its children. */
52 struct tms
54 clock_t tms_utime; /* User CPU time. */
55 clock_t tms_stime; /* System CPU time. */
57 clock_t tms_cutime; /* User CPU time of dead children. */
58 clock_t tms_cstime; /* System CPU time of dead children. */
60 # define GNULIB_defined_struct_tms 1
61 # endif
62 # endif
64 # if @GNULIB_TIMES@
65 # if !@HAVE_TIMES@
66 extern clock_t times (struct tms *buffer) _GL_ARG_NONNULL ((1));
67 # endif
68 # elif defined GNULIB_POSIXCHECK
69 # undef times
70 # if HAVE_RAW_DECL_TIMES
71 _GL_WARN_ON_USE (times, "times is unportable - "
72 "use gnulib module times for portability");
73 # endif
74 # endif
76 # ifdef __cplusplus
78 # endif
80 #endif /* _@GUARD_PREFIX@_SYS_TIMES_H */