1 /* Provide gettimeofday
2 1. for systems that don't have it,
3 2. for some systems where gettimeofday clobbers the static buffer that
4 localtime uses for it's return value. The gettimeofday function from
5 Mac OS X 10.0.4, i.e. Darwin 1.3.7 has this problem.
6 The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and
9 Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
25 #ifndef GETTIMEOFDAY_H
26 #define GETTIMEOFDAY_H
28 #if TIME_WITH_SYS_TIME
29 # include <sys/time.h>
33 # include <sys/time.h>
39 #if !HAVE_STRUCT_TIMEVAL
47 #if !HAVE_GETTIMEOFDAY_POSIX_SIGNATURE || GETTIMEOFDAY_CLOBBERS_LOCALTIME
49 # define gettimeofday rpl_gettimeofday
50 extern int gettimeofday (struct timeval *restrict tp, void *restrict tzp);
53 #endif /* GETTIMEOFDAY_H */