diff options
author | Christopher Faylor <me@cgf.cx> | 2004-09-16 03:49:03 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-09-16 03:49:03 +0000 |
commit | 22a1a24f10203d4a361cb6b1742d2b04f524e221 (patch) | |
tree | 9d0a715e2bdfd4cff5da512290a67cead977cd90 /winsup/cygwin/dcrt0.cc | |
parent | 181cb05147a5590048f29f246f4b146e6f3b8112 (diff) | |
download | cygnal-22a1a24f10203d4a361cb6b1742d2b04f524e221.tar.gz cygnal-22a1a24f10203d4a361cb6b1742d2b04f524e221.tar.bz2 cygnal-22a1a24f10203d4a361cb6b1742d2b04f524e221.zip |
* cygwin.din (_impure_ptr): Export.
(reent_data): Don't export.
* dcrt0.cc (reent_data): Drop.
(__cygwin_user_data): Initialize impure_ptr as GLOBAL_REENT.
(_dll_crt0): Initialize _impure_ptr as GLOBAL_REENT.
* lib/_cygwin_crt0_common.cc (_impure_ptr): Drop. Declare extern as dllimport
instead.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 2ab6eb610..4ad5968ed 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -98,7 +98,6 @@ extern "C" char ***main_environ; /* __progname used in getopt error message */ char *__progname; - struct _reent reent_data; struct per_process __cygwin_user_data = {/* initial_sp */ 0, /* magic_biscuit */ 0, /* dll_major */ CYGWIN_VERSION_DLL_MAJOR, @@ -119,7 +118,7 @@ extern "C" /* api_minor */ CYGWIN_VERSION_API_MINOR, /* unused2 */ {0, 0, 0, 0, 0}, /* resourcelocks */ &_reslock, /* threadinterface */ &_mtinterf, - /* impure_ptr */ &reent_data, + /* impure_ptr */ _GLOBAL_REENT, }; bool ignore_case_with_glob; int __declspec (dllexport) _check_for_executable = true; @@ -925,7 +924,7 @@ _dll_crt0 () *main_environ = NULL; char padding[CYGTLS_PADSIZE]; - _impure_ptr = &reent_data; + _impure_ptr = _GLOBAL_REENT; _impure_ptr->_stdin = &_impure_ptr->__sf[0]; _impure_ptr->_stdout = &_impure_ptr->__sf[1]; _impure_ptr->_stderr = &_impure_ptr->__sf[2]; @@ -947,7 +946,7 @@ dll_crt0 (per_process *uptr) if (uptr && uptr != user_data) { memcpy (user_data, uptr, per_process_overwrite); - *(user_data->impure_ptr_ptr) = &reent_data; + *(user_data->impure_ptr_ptr) = _GLOBAL_REENT; } _dll_crt0 (); } |