* Makefile.in (DLL_OFILES): Remove _def_time.o.

* libc/_def_time.c: Remove.  Move definitions of _DefaultTimeLocale
	and _CurrentTimeLocale ...
	* libc/strptime.cc: ... here.
This commit is contained in:
Corinna Vinschen 2008-05-10 18:57:10 +00:00
parent 12b830981e
commit 1563f79fa8
4 changed files with 35 additions and 45 deletions

View File

@ -1,3 +1,10 @@
2008-05-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Remove _def_time.o.
* libc/_def_time.c: Remove. Move definitions of _DefaultTimeLocale
and _CurrentTimeLocale ...
* libc/strptime.cc: ... here.
2008-05-08 Corinna Vinschen <corinna@vinschen.de> 2008-05-08 Corinna Vinschen <corinna@vinschen.de>
* include/sys/localedef.h: Remove. * include/sys/localedef.h: Remove.

View File

@ -126,7 +126,7 @@ MT_SAFE_OBJECTS:=
# Please maintain this list in sorted order, with maximum files per 86 col line # Please maintain this list in sorted order, with maximum files per 86 col line
# #
DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \ DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \
cygtls.o dcrt0.o debug.o _def_time.o devices.o dir.o dlfcn.o dll_init.o \ cygtls.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o \
dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o \ dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o \
fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o \ fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o \
fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o \ fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o \

View File

@ -1,42 +0,0 @@
/* $NetBSD: _def_time.c,v 1.9 2007/03/28 19:05:53 manu Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>.
* Public domain.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: _def_time.c,v 1.9 2007/03/28 19:05:53 manu Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
#include <locale.h>
_TimeLocale _DefaultTimeLocale =
{
{
"Sun","Mon","Tue","Wed","Thu","Fri","Sat",
},
{
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday"
},
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
},
{
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
},
{
"AM", "PM"
},
"%a %b %e %H:%M:%S %Y",
"%m/%d/%y",
"%H:%M:%S",
"%I:%M:%S %p"
};
_TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale;

View File

@ -63,8 +63,33 @@ typedef struct {
const char *t_fmt_ampm; const char *t_fmt_ampm;
} _TimeLocale; } _TimeLocale;
extern _TimeLocale *_CurrentTimeLocale; _TimeLocale _DefaultTimeLocale =
extern _TimeLocale _DefaultTimeLocale; {
{
"Sun","Mon","Tue","Wed","Thu","Fri","Sat",
},
{
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday"
},
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
},
{
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
},
{
"AM", "PM"
},
"%a %b %e %H:%M:%S %Y",
"%m/%d/%y",
"%H:%M:%S",
"%I:%M:%S %p"
};
_TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale;
#endif #endif
#define _ctloc(x) (_CurrentTimeLocale->x) #define _ctloc(x) (_CurrentTimeLocale->x)