This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
time.h and natTimeZone.cc
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: tromey at redhat dot com
- Cc: GCC-Java <java at gcc dot gnu dot org>
- Date: Mon, 13 May 2002 23:01:33 -0400
- Subject: time.h and natTimeZone.cc
Why did the last patch you sent in got rid of this part?
This is needed for struct tm.
#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
Thanks,
Andrew Pinski
Here is the patch to put it back:
ChangeLog:
2002-05-13 Andrew Pinski <pinskia@physics.uc.edu>
* java/util/natTimeZone.cc: add back the include for time.h and/or
sys/time.h
Index: libjava/java/util/natTimeZone.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/natTimeZone.cc,v
retrieving revision 1.3
diff -u -r1.3 natTimeZone.cc
--- libjava/java/util/natTimeZone.cc 13 May 2002 20:10:37 -0000
1.3
+++ libjava/java/util/natTimeZone.cc 14 May 2002 02:59:36 -0000
@@ -17,6 +17,18 @@
#include <java/lang/Character.h>
#include <java/lang/Integer.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
+
/*
* This method returns a time zone string that is used by
init_properties
* to set the default timezone property 'user.timezone'. That value is