From 96dea8f6b7141ee99a8ad32895eba0d7523c394b Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Tue, 7 Mar 2006 22:00:44 +0000 Subject: [PATCH] Fix old libc substitution files, now needed for windows/mingw32 porting. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13524 57a11ea4-9604-0410-9ed3-97b8803252fd --- lib/libc/localtime_r.c | 2 +- lib/libc/setenv.c | 2 ++ lib/libc/setenv.h | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/libc/localtime_r.c b/lib/libc/localtime_r.c index cce996511b..c1cf0ccb18 100644 --- a/lib/libc/localtime_r.c +++ b/lib/libc/localtime_r.c @@ -34,7 +34,7 @@ localtime_r(const time_t *const timep, struct tm *p_tm) 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)); diff --git a/lib/libc/setenv.c b/lib/libc/setenv.c index 35dd2f2d3a..c5594872aa 100644 --- a/lib/libc/setenv.c +++ b/lib/libc/setenv.c @@ -21,8 +21,10 @@ \********************************************************************/ #include +#include #include #include +#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, diff --git a/lib/libc/setenv.h b/lib/libc/setenv.h index 9291aef6ab..9f7339e1ca 100644 --- a/lib/libc/setenv.h +++ b/lib/libc/setenv.h @@ -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 setenv(const char *name, const char *value, int overwrite); int unsetenv(const char *name); #endif +#endif