1 /* Provide a sys/times.h header file.
2 Copyright (C) 2008-2010 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)
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, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
20 /* This file is supposed to be used on platforms where <sys/times.h>
24 @PRAGMA_SYSTEM_HEADER@
27 #ifndef _GL_SYS_TIMES_H
29 # if @HAVE_SYS_TIMES_H@
30 # @INCLUDE_NEXT@ @NEXT_SYS_TIMES_H@
33 # define _GL_SYS_TIMES_H
36 But avoid namespace pollution on glibc systems. */
41 /* The definition of _GL_ARG_NONNULL is copied here. */
43 /* The definition of _GL_WARN_ON_USE is copied here. */
49 # if !@HAVE_STRUCT_TMS@
50 /* Structure describing CPU time used by a process and its children. */
53 clock_t tms_utime; /* User CPU time. */
54 clock_t tms_stime; /* System CPU time. */
56 clock_t tms_cutime; /* User CPU time of dead children. */
57 clock_t tms_cstime; /* System CPU time of dead children. */
63 extern clock_t times (struct tms *buffer) _GL_ARG_NONNULL ((1));
65 # elif defined GNULIB_POSIXCHECK
67 # if HAVE_RAW_DECL_TIMES
68 _GL_WARN_ON_USE (times, "times is unportable - "
69 "use gnulib module times for portability");
77 #endif /* _GL_SYS_TIMES_H */