summaryrefslogtreecommitdiff
path: root/libavformat/strptime.c
diff options
context:
space:
mode:
authorGlenn Maynard <g_sf@zewt.org>2003-09-04 09:52:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-09-04 09:52:39 +0000
commit5e4639e2002d0a19d4278f9ff4ed11f1bdace33b (patch)
treee5b3e7300e2474c4bdd84a31f9c3ca6dab2b967e /libavformat/strptime.c
parenta17236c53cd3ffe1d4eceb3be82b39001c006b3f (diff)
localtime_r patch by (Glenn Maynard <g_sf at zewt dot org>)
Originally committed as revision 2204 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/strptime.c')
-rw-r--r--libavformat/strptime.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libavformat/strptime.c b/libavformat/strptime.c
index 7aece6a08e..45645384ba 100644
--- a/libavformat/strptime.c
+++ b/libavformat/strptime.c
@@ -37,6 +37,7 @@
#endif
#include "strptime.h"
+#include "localtime_r.h"
#ifndef __P
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
@@ -46,28 +47,6 @@
# endif /* GCC. */
#endif /* Not __P. */
-#if ! HAVE_LOCALTIME_R && ! defined localtime_r
-# ifdef _LIBC
-# define localtime_r __localtime_r
-# else
-/* Approximate localtime_r as best we can in its absence. */
-# define localtime_r my_localtime_r
-static struct tm *localtime_r __P ((const time_t *, struct tm *));
-static struct tm *
-localtime_r (t, tp)
- const time_t *t;
- struct tm *tp;
-{
- struct tm *l = localtime (t);
- if (! l)
- return 0;
- *tp = *l;
- return tp;
-}
-# endif /* ! _LIBC */
-#endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */
-
-
#define match_char(ch1, ch2) if (ch1 != ch2) return NULL
#if defined __GNUC__ && __GNUC__ >= 2
# define match_string(cs1, s2) \