* 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.
This commit is contained in:
parent
181cb05147
commit
22a1a24f10
@ -1,3 +1,13 @@
|
|||||||
|
2004-09-15 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2004-09-14 Christopher Faylor <cgf@timesys.com>
|
2004-09-14 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* cygtls.h: Add alignment kludge to fix disparity between compilers.
|
* cygtls.h: Add alignment kludge to fix disparity between compilers.
|
||||||
|
@ -12,6 +12,7 @@ __rcmd_errstr DATA
|
|||||||
_check_for_executable DATA
|
_check_for_executable DATA
|
||||||
_ctype_ DATA
|
_ctype_ DATA
|
||||||
_daylight DATA
|
_daylight DATA
|
||||||
|
_impure_ptr DATA
|
||||||
_sys_errlist DATA
|
_sys_errlist DATA
|
||||||
sys_errlist = _sys_errlist DATA
|
sys_errlist = _sys_errlist DATA
|
||||||
_sys_nerr DATA
|
_sys_nerr DATA
|
||||||
@ -24,7 +25,6 @@ opterr DATA
|
|||||||
optind DATA
|
optind DATA
|
||||||
optopt DATA
|
optopt DATA
|
||||||
optreset DATA
|
optreset DATA
|
||||||
reent_data DATA
|
|
||||||
_alloca NOSIGFE
|
_alloca NOSIGFE
|
||||||
dll_entry@12 NOSIGFE
|
dll_entry@12 NOSIGFE
|
||||||
__assert SIGFE
|
__assert SIGFE
|
||||||
|
@ -98,7 +98,6 @@ extern "C"
|
|||||||
char ***main_environ;
|
char ***main_environ;
|
||||||
/* __progname used in getopt error message */
|
/* __progname used in getopt error message */
|
||||||
char *__progname;
|
char *__progname;
|
||||||
struct _reent reent_data;
|
|
||||||
struct per_process __cygwin_user_data =
|
struct per_process __cygwin_user_data =
|
||||||
{/* initial_sp */ 0, /* magic_biscuit */ 0,
|
{/* initial_sp */ 0, /* magic_biscuit */ 0,
|
||||||
/* dll_major */ CYGWIN_VERSION_DLL_MAJOR,
|
/* dll_major */ CYGWIN_VERSION_DLL_MAJOR,
|
||||||
@ -119,7 +118,7 @@ extern "C"
|
|||||||
/* api_minor */ CYGWIN_VERSION_API_MINOR,
|
/* api_minor */ CYGWIN_VERSION_API_MINOR,
|
||||||
/* unused2 */ {0, 0, 0, 0, 0},
|
/* unused2 */ {0, 0, 0, 0, 0},
|
||||||
/* resourcelocks */ &_reslock, /* threadinterface */ &_mtinterf,
|
/* resourcelocks */ &_reslock, /* threadinterface */ &_mtinterf,
|
||||||
/* impure_ptr */ &reent_data,
|
/* impure_ptr */ _GLOBAL_REENT,
|
||||||
};
|
};
|
||||||
bool ignore_case_with_glob;
|
bool ignore_case_with_glob;
|
||||||
int __declspec (dllexport) _check_for_executable = true;
|
int __declspec (dllexport) _check_for_executable = true;
|
||||||
@ -925,7 +924,7 @@ _dll_crt0 ()
|
|||||||
*main_environ = NULL;
|
*main_environ = NULL;
|
||||||
|
|
||||||
char padding[CYGTLS_PADSIZE];
|
char padding[CYGTLS_PADSIZE];
|
||||||
_impure_ptr = &reent_data;
|
_impure_ptr = _GLOBAL_REENT;
|
||||||
_impure_ptr->_stdin = &_impure_ptr->__sf[0];
|
_impure_ptr->_stdin = &_impure_ptr->__sf[0];
|
||||||
_impure_ptr->_stdout = &_impure_ptr->__sf[1];
|
_impure_ptr->_stdout = &_impure_ptr->__sf[1];
|
||||||
_impure_ptr->_stderr = &_impure_ptr->__sf[2];
|
_impure_ptr->_stderr = &_impure_ptr->__sf[2];
|
||||||
@ -947,7 +946,7 @@ dll_crt0 (per_process *uptr)
|
|||||||
if (uptr && uptr != user_data)
|
if (uptr && uptr != user_data)
|
||||||
{
|
{
|
||||||
memcpy (user_data, uptr, per_process_overwrite);
|
memcpy (user_data, uptr, per_process_overwrite);
|
||||||
*(user_data->impure_ptr_ptr) = &reent_data;
|
*(user_data->impure_ptr_ptr) = _GLOBAL_REENT;
|
||||||
}
|
}
|
||||||
_dll_crt0 ();
|
_dll_crt0 ();
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,9 @@ details. */
|
|||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* Avoid an info message from linker when linking applications. */
|
||||||
|
extern __declspec(dllimport) struct _reent *_impure_ptr;
|
||||||
|
|
||||||
#undef environ
|
#undef environ
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
@ -23,7 +26,6 @@ char **environ;
|
|||||||
int cygwin_attach_dll (HMODULE, MainFunc);
|
int cygwin_attach_dll (HMODULE, MainFunc);
|
||||||
int cygwin_attach_noncygwin_dll (HMODULE, MainFunc);
|
int cygwin_attach_noncygwin_dll (HMODULE, MainFunc);
|
||||||
int main (int, char **, char **);
|
int main (int, char **, char **);
|
||||||
struct _reent *_impure_ptr;
|
|
||||||
int _fmode;
|
int _fmode;
|
||||||
void _pei386_runtime_relocator ();
|
void _pei386_runtime_relocator ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user