Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-11-09 01:44:16 +0300
committerJeff Johnston <jjohnstn@redhat.com>2005-11-09 01:44:16 +0300
commitb397593c94941f7ef41a265e065f57dffaa7e9bd (patch)
treed61af3b0dd99feb68d5c08c06d70e05c11f9a9f2 /newlib/libc/time
parent86c6c4212fc4d69a499654f4f95fed11d1226678 (diff)
2005-11-08 Tom Walsh <tom@openhardware.net>
* libc/time/tzvars.c: New file. * libc/time/tzset_r.c: Moved globals into tzvars.c so other time functions needn't link in __tzset_r and its dependencies. * libc/time/Makefile.am: Add the new file. * libc/time/Makefile.in: Regenerated.
Diffstat (limited to 'newlib/libc/time')
-rw-r--r--newlib/libc/time/Makefile.am3
-rw-r--r--newlib/libc/time/Makefile.in6
-rw-r--r--newlib/libc/time/tzset_r.c5
-rw-r--r--newlib/libc/time/tzvars.c10
4 files changed, 15 insertions, 9 deletions
diff --git a/newlib/libc/time/Makefile.am b/newlib/libc/time/Makefile.am
index 3e0ae571a..f5c9a02a7 100644
--- a/newlib/libc/time/Makefile.am
+++ b/newlib/libc/time/Makefile.am
@@ -23,7 +23,8 @@ LIB_SOURCES = \
time.c \
tzlock.c \
tzset.c \
- tzset_r.c
+ tzset_r.c \
+ tzvars.c
libtime_la_LDFLAGS = -Xcompiler -nostdlib
diff --git a/newlib/libc/time/Makefile.in b/newlib/libc/time/Makefile.in
index c56c998ad..abdfc6530 100644
--- a/newlib/libc/time/Makefile.in
+++ b/newlib/libc/time/Makefile.in
@@ -110,7 +110,7 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-LIB_SOURCES = asctime.c asctime_r.c clock.c ctime.c ctime_r.c difftime.c gettzinfo.c gmtime.c gmtime_r.c lcltime.c lcltime_r.c mktime.c mktm_r.c strftime.c strptime.c time.c tzlock.c tzset.c tzset_r.c
+LIB_SOURCES = asctime.c asctime_r.c clock.c ctime.c ctime_r.c difftime.c gettzinfo.c gmtime.c gmtime_r.c lcltime.c lcltime_r.c mktime.c mktm_r.c strftime.c strptime.c time.c tzlock.c tzset.c tzset_r.c tzvars.c
libtime_la_LDFLAGS = -Xcompiler -nostdlib
@@ -149,7 +149,7 @@ lib_a_LIBADD =
@USE_LIBTOOL_FALSE@lcltime_r.$(OBJEXT) mktime.$(OBJEXT) \
@USE_LIBTOOL_FALSE@mktm_r.$(OBJEXT) strftime.$(OBJEXT) \
@USE_LIBTOOL_FALSE@strptime.$(OBJEXT) time.$(OBJEXT) tzlock.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@tzset.$(OBJEXT) tzset_r.$(OBJEXT)
+@USE_LIBTOOL_FALSE@tzset.$(OBJEXT) tzset_r.$(OBJEXT) tzvars.$(OBJEXT)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libtime_la_LIBADD =
@@ -157,7 +157,7 @@ libtime_la_LIBADD =
@USE_LIBTOOL_TRUE@ctime.lo ctime_r.lo difftime.lo gettzinfo.lo \
@USE_LIBTOOL_TRUE@gmtime.lo gmtime_r.lo lcltime.lo lcltime_r.lo \
@USE_LIBTOOL_TRUE@mktime.lo mktm_r.lo strftime.lo strptime.lo time.lo \
-@USE_LIBTOOL_TRUE@tzlock.lo tzset.lo tzset_r.lo
+@USE_LIBTOOL_TRUE@tzlock.lo tzset.lo tzset_r.lo tzvars.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff --git a/newlib/libc/time/tzset_r.c b/newlib/libc/time/tzset_r.c
index 49e519de5..36b87d7b2 100644
--- a/newlib/libc/time/tzset_r.c
+++ b/newlib/libc/time/tzset_r.c
@@ -11,11 +11,6 @@ static char __tzname_std[11];
static char __tzname_dst[11];
static char *prev_tzenv = NULL;
-/* default to GMT */
-char *_tzname[2] = {"GMT", "GMT"};
-int _daylight = 0;
-long _timezone = 0;
-
_VOID
_DEFUN (_tzset_r, (reent_ptr),
struct _reent *reent_ptr)
diff --git a/newlib/libc/time/tzvars.c b/newlib/libc/time/tzvars.c
new file mode 100644
index 000000000..d1f17649b
--- /dev/null
+++ b/newlib/libc/time/tzvars.c
@@ -0,0 +1,10 @@
+#include <time.h>
+
+/* Global timezone variables. */
+
+/* Default timezone to GMT */
+char *_tzname[2] = {"GMT", "GMT"};
+int _daylight = 0;
+long _timezone = 0;
+
+