diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-08 22:44:16 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-08 22:44:16 +0000 |
commit | b397593c94941f7ef41a265e065f57dffaa7e9bd (patch) | |
tree | d61af3b0dd99feb68d5c08c06d70e05c11f9a9f2 | |
parent | 86c6c4212fc4d69a499654f4f95fed11d1226678 (diff) | |
download | newlib-b397593c94941f7ef41a265e065f57dffaa7e9bd.zip newlib-b397593c94941f7ef41a265e065f57dffaa7e9bd.tar.gz newlib-b397593c94941f7ef41a265e065f57dffaa7e9bd.tar.bz2 |
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.
-rw-r--r-- | newlib/ChangeLog | 9 | ||||
-rw-r--r-- | newlib/libc/time/Makefile.am | 3 | ||||
-rw-r--r-- | newlib/libc/time/Makefile.in | 6 | ||||
-rw-r--r-- | newlib/libc/time/tzset_r.c | 5 | ||||
-rw-r--r-- | newlib/libc/time/tzvars.c | 10 |
5 files changed, 24 insertions, 9 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index ddbfef7..745ed28 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,12 @@ +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. + 2005-11-08 Christopher Faylor <cgf@timesys.com> * libc/include/string.h: Add cygwin-specific function declaration. diff --git a/newlib/libc/time/Makefile.am b/newlib/libc/time/Makefile.am index 3e0ae57..f5c9a02 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 c56c998..abdfc65 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 49e519d..36b87d7 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 0000000..d1f1764 --- /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; + + |