From f97e7d754c03d1a2b09a0da9fe7564ad445b7476 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 20 Feb 2001 02:53:55 +0000 Subject: [PATCH] * cygwin.din: Export rand48 functions. * thread.cc (MTinterface::Init): Remove the initialization of `reent_data'. * dcrt0.cc: Add the initalizer to the declaration of `reent_data'. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/cygwin.din | 18 ++++++++++++++++++ winsup/cygwin/dcrt0.cc | 5 ++++- winsup/cygwin/include/cygwin/version.h | 4 +++- winsup/cygwin/thread.cc | 8 -------- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c035a64a7..689ce76d8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2001-02-15 Kazuhiro Fujieda + + * cygwin.din: Export rand48 functions. + * thread.cc (MTinterface::Init): Remove the initialization of + `reent_data'. + * dcrt0.cc: Add the initalizer to the declaration of `reent_data'. + * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35. + 2001-02-16 Egor Duda * signal.cc (signal): Prohibit setting handlers for SIGKILL and diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index aa9ee8a13..184c10b06 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -866,6 +866,24 @@ y1 y1f yn ynf +drand48 +_drand48 = drand48 +erand48 +_erand48 = erand48 +jrand48 +_jrand48 = jrand48 +lcong48 +_lcong48 = lcong48 +lrand48 +_lrand48 = lrand48 +mrand48 +_lrand48 = lrand48 +nrand48 +_nrand48 = nrand48 +seed48 +_seed48 = seed48 +srand48 +_srand48 = srand48 setmode _setmode = setmode __assertfail diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 1e1aeaf62..553931338 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -85,7 +85,7 @@ extern "C" char ***main_environ; /* __progname used in getopt error message */ char *__progname = NULL; - struct _reent reent_data; + struct _reent reent_data = _REENT_INIT(reent_data); struct per_process __cygwin_user_data = {/* initial_sp */ 0, /* magic_biscuit */ 0, /* dll_major */ CYGWIN_VERSION_DLL_MAJOR, @@ -765,6 +765,9 @@ dll_crt0_1 () if (!old_title && GetConsoleTitle (title_buf, TITLESIZE)) old_title = title_buf; + /* Initialize locale */ + locale_init (); + /* Allocate fdtab */ dtable_init (); diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index abb76c070..1095aac3b 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -125,10 +125,12 @@ details. */ 32: Export getrlimit/setrlimit 33: Export setlogmask 34: Separated out mount table + 35: Export drand48, erand48, jrand48, lcong48, lrand48, + mrand48, nrand48, seed48, and srand48. */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 34 +#define CYGWIN_VERSION_API_MINOR 35 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 81341e460..d34906d42 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -301,14 +301,6 @@ MTinterface::Init (int forked) item->sigmask = NULL; item->sigtodo = NULL; #endif - - struct _reent *r = _REENT; - memset (r, 0, sizeof (struct _reent)); - - r->_errno = 0; - r->_stdin = &r->__sf[0]; - r->_stdout = &r->__sf[1]; - r->_stderr = &r->__sf[2]; } ThreadItem *