[Gnucash-changes] r13524 - gnucash/trunk/lib/libc - Fix old libc substitution files, now needed for windows/mingw32

Christian Stimming cstim at cvs.gnucash.org
Tue Mar 7 17:00:44 EST 2006


Author: cstim
Date: 2006-03-07 17:00:44 -0500 (Tue, 07 Mar 2006)
New Revision: 13524
Trac: http://svn.gnucash.org/trac/changeset/13524

Modified:
   gnucash/trunk/lib/libc/localtime_r.c
   gnucash/trunk/lib/libc/setenv.c
   gnucash/trunk/lib/libc/setenv.h
Log:
Fix old libc substitution files, now needed for windows/mingw32
porting.



Modified: gnucash/trunk/lib/libc/localtime_r.c
===================================================================
--- gnucash/trunk/lib/libc/localtime_r.c	2006-03-07 21:59:15 UTC (rev 13523)
+++ gnucash/trunk/lib/libc/localtime_r.c	2006-03-07 22:00:44 UTC (rev 13524)
@@ -34,7 +34,7 @@
 struct tm *
 localtime_r(const time_t *const timep, struct tm *p_tm)
 {
-    static tm* tmp;
+    static struct tm* tmp;
     tmp = localtime(timep);
     if (tmp) {
             memcpy(p_tm, tmp, sizeof(struct tm));

Modified: gnucash/trunk/lib/libc/setenv.c
===================================================================
--- gnucash/trunk/lib/libc/setenv.c	2006-03-07 21:59:15 UTC (rev 13523)
+++ gnucash/trunk/lib/libc/setenv.c	2006-03-07 22:00:44 UTC (rev 13524)
@@ -21,8 +21,10 @@
 \********************************************************************/
 
 #include <glib.h>
+#include <glib/gprintf.h>
 #include <stdlib.h>
 #include <string.h>
+#include "setenv.h"
 
 /* This setenv() papers over the brokenness of of systems that only
  * have putenv() which takes ownership of the pointer you give it,

Modified: gnucash/trunk/lib/libc/setenv.h
===================================================================
--- gnucash/trunk/lib/libc/setenv.h	2006-03-07 21:59:15 UTC (rev 13523)
+++ gnucash/trunk/lib/libc/setenv.h	2006-03-07 22:00:44 UTC (rev 13524)
@@ -20,8 +20,8 @@
  *
 \********************************************************************/
 
-#ifndef GNC_CORE_UTILS_H
-#define GNC_CORE_UTILS_H
+#ifndef __SETENV_H
+#define __SETENV_H
 
 #include "config.h"
 
@@ -31,3 +31,4 @@
 int unsetenv(const char *name);
 
 #endif
+#endif



More information about the gnucash-changes mailing list