time.h and natTimeZone.cc

Andrew Pinski pinskia@physics.uc.edu
Mon May 13 20:01:00 GMT 2002


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



More information about the Java mailing list