Drop global __ctype_ptr__ entirely in favor of using locale_t::ctype_ptr
Keep __ctype_ptr__ available on Cygwin only, for backward compatibility with existing apps referencing it via the ctype macros. Otherwise initialize __global_locale.ctype_ptr and __C_locale.ctype_ptr and use them throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -64,10 +64,10 @@ __set_ctype (struct __locale_t *loc, const char *charset)
|
||||
}
|
||||
ctype_ptr = (char *) _ctype_b;
|
||||
}
|
||||
if (loc)
|
||||
loc->ctype_ptr = ctype_ptr + 127;
|
||||
else
|
||||
__ctype_ptr__ = ctype_ptr + 127;
|
||||
loc->ctype_ptr = ctype_ptr + 127;
|
||||
/* For backward compatibilty */
|
||||
if (loc == __get_global_locale ())
|
||||
__ctype_ptr__ = loc->ctype_ptr;
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
||||
|
Reference in New Issue
Block a user