1 /* 2 * (c) The University of Glasgow 2002 3 * 4 * Time Runtime Support 5 */ 6 #ifndef __TIMEUTILS_H__ 7 #define __TIMEUTILS_H__ 8 9 #include "HsTimeConfig.h" 10 // Otherwise these clash with similar definitions from other packages: 11 #undef PACKAGE_BUGREPORT 12 #undef PACKAGE_NAME 13 #undef PACKAGE_STRING 14 #undef PACKAGE_TARNAME 15 #undef PACKAGE_VERSION 16 17 #if HAVE_GETTIMEOFDAY 18 # if HAVE_SYS_TIME_H 19 # include <sys/time.h> 20 # endif 21 #elif HAVE_GETCLOCK 22 # if HAVE_SYS_TIMERS_H 23 # define POSIX_4D9 1 24 # include <sys/timers.h> 25 # endif 26 #endif 27 #if HAVE_TIME_H 28 #include <time.h> 29 #endif 30 #if HAVE_SYS_TIMEB_H && !defined(__FreeBSD__) 31 #include <sys/timeb.h> 32 #endif 33 34 extern long *__hscore_timezone( void ); 35 extern char **__hscore_tzname( void ); 36 37 #if HAVE_GETTIMEOFDAY 38 extern int __hscore_gettimeofday(struct timeval *tp, void *tzp); 39 #endif 40 41 #if HAVE_GMTIME_R 42 extern struct tm *__hscore_gmtime_r(const time_t *clock, struct tm *result); 43 #endif 44 45 #if HAVE_LOCALTIME_R 46 extern struct tm *__hscore_localtime_r(const time_t *clock, struct tm *result); 47 #endif 48 49 #endif /* __TIMEUTILS_H__ */ 50