Changeset 362 for trunk/src/sh_unix.c
- Timestamp:
- Oct 19, 2011, 12:16:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_unix.c
r343 r362 2169 2169 struct tm aa; 2170 2170 struct tm bb; 2171 struct tm * cc; 2171 2172 2172 int sign = 0; 2173 2173 int diff = 0; … … 2178 2178 2179 2179 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GMTIME_R) 2180 cc = gmtime_r (xx, &aa); 2181 #else 2182 cc = gmtime (xx); 2183 memcpy (&aa, cc, sizeof(struct tm)); 2180 gmtime_r (xx, &aa); 2181 #else 2182 memcpy (&aa, gmtime(xx), sizeof(struct tm)); 2184 2183 #endif 2185 2184 2186 2185 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R) 2187 cc = localtime_r (xx, &bb); 2188 #else 2189 cc = localtime (xx); 2190 memcpy (&bb, cc, sizeof(struct tm)); 2186 localtime_r (xx, &bb); 2187 #else 2188 memcpy (&bb, localtime(xx), sizeof(struct tm)); 2191 2189 #endif 2192 2190
Note:
See TracChangeset
for help on using the changeset viewer.