I've made a patch in order to fix a build error on win32.

It is unable to find the tm_gmtoff propierty on the struct tm { ... };structure.

There are some build problems yet to fix to get the current 0.5 branch
working on Win32.
The readdir_r check on the configure seems to be broken. My autoconf-fu is
so poor that I'll need some time to fix this, some help here would be
welcome.


--
Un saludo,
Alberto Ruiz
Index: cherokee/server.c
===================================================================
--- cherokee/server.c	(revision 527)
+++ cherokee/server.c	(working copy)
@@ -1093,6 +1093,9 @@
 {
 	time_t       newtime;
 	static long *this_timezone = NULL;
+#ifdef _WIN32
+	int tm_gmtoff;
+#endif
 
 	/* Read the time
 	 */
@@ -1113,6 +1116,15 @@
 		this_timezone = cherokee_get_timezone_ref();
 		
 	cherokee_buffer_clean  (srv->bogo_now_string);
+	
+#ifdef _WIN32
+	tm_gmtoff =
+		(timezone / 60 - (srv->bogo_now_tm.tm_isdst > 0 ? 60 : 0 ))
+	       	* -60;
+#else
+	tm_gmtoff = srv->bogo_now_tb.tm_gmtoff;
+#endif
+
 	cherokee_buffer_add_va (srv->bogo_now_string,
 				"%s, %02d %s %d %02d:%02d:%02d GMT%c%d",
 				cherokee_weekdays[srv->bogo_now_tm.tm_wday], 
@@ -1122,8 +1134,8 @@
 				srv->bogo_now_tm.tm_hour,
 				srv->bogo_now_tm.tm_min,
 				srv->bogo_now_tm.tm_sec,
-				srv->bogo_now_tm.tm_gmtoff < 0 ? '-' : '+',
-				abs(srv->bogo_now_tm.tm_gmtoff / 3600));
+				tm_gmtoff < 0 ? '-' : '+',
+				abs(tm_gmtoff / 3600));
 	
 	CHEROKEE_RWLOCK_UNLOCK (&srv->bogo_now_mutex);      /* 2.- release */
 }
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to