[Asterisk-cvs] asterisk/stdtime localtime.c,1.9,1.10
markster at lists.digium.com
markster at lists.digium.com
Tue Dec 14 18:39:45 CST 2004
Update of /usr/cvsroot/asterisk/stdtime
In directory mongoose.digium.com:/tmp/cvs-serv25047/stdtime
Modified Files:
localtime.c
Log Message:
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
Index: localtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/stdtime/localtime.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- localtime.c 31 Aug 2004 13:39:04 -0000 1.9
+++ localtime.c 14 Dec 2004 23:36:30 -0000 1.10
@@ -113,6 +113,12 @@
#define MY_TZNAME_MAX 255
#endif /* !defined TZNAME_MAX */
+#ifdef SOLARIS
+#undef TM_ZONE
+#undef TM_GMTOFF
+#endif
+
+
struct state {
char name[TZ_STRLEN_MAX + 1];
int leapcnt;
@@ -1208,7 +1214,11 @@
char *buf;
{
struct tm tm;
+#ifdef SOLARIS
+ return asctime_r(localtime_r(timep, &tm), buf, 256);
+#else
return asctime_r(localtime_r(timep, &tm), buf);
+#endif
}
/*
More information about the svn-commits
mailing list