changeset 1562:9d35d0949d75

Improve handling of time headers
author bert <bert>
date Thu, 18 Sep 2003 14:45:25 +0000
parents 895b657b8a04
children 91c44c85875e
files volume_io/Prog_utils/time.c
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/volume_io/Prog_utils/time.c
+++ b/volume_io/Prog_utils/time.c
@@ -12,14 +12,25 @@
               express or implied warranty.
 ---------------------------------------------------------------------------- */
 
+#include "config.h"
 #include  <sys/types.h>
 #include  <sys/times.h>
-#include  <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
 #include  <unistd.h>
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.19 1997-03-23 21:11:31 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.20 2003-09-18 14:45:25 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -238,9 +249,6 @@
     time_t           clock_time;
     struct  tm       *time_tm;
     char             *str;
-#ifndef __sgi
-    time_t   time();
-#endif
 
     (void) time( &clock_time );
 
@@ -310,9 +318,6 @@
     time_t           clock_time;
     struct  tm       *time_tm;
     char             *str;
-#ifndef __sgi
-    time_t time();
-#endif
 
     (void) time( &clock_time );