Commit 6f3943b erroneously removed the `#ifdef _COMPILING_NEWLIB'
guarding the __getreent inline function. This patch ignored the
fact that config.h is included when building applications, and the
code in question requires internal, auto-generated headers to be
available which are not exposed to user-space.
Reinstantiate defined(_COMPILING_NEWLIB) test and alternatively
check for defined (__INSIDE_CYGWIN__), otherwise we'd have to
reinstantiate the __getreent macro in cygtls.h which is really
confusing.
While testing it turned out that a low number of source codes inside
Cygwin won't see the inline __getreent due to a missing __INSIDE_CYGWIN__
definition. For malloc.cc this was actually deliberate to get different
definitions from including cygmalloc.h. Change this by defining
__INSIDE_CYGWIN__ in malloc.cc but changing the test in cygmalloc.h
to test for defined(DLMALLOC_VERSION). This might need a change if we
ever get around to replace dlmalloc with a newer, more threading-aware
malloc implementation.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Throughout, simplify the C99/C11 conditionals, and replace
__STRICT_ANSI__ with the proper internal POSIX macros. The _*_r
reentrant functions need not be guarded (and most haven't been) because
such names in the global scope are reserved to the implementation.
atoff is unique to newlib.
dtoa is not actually exported (_dtoa_r is used internally), is
nonstandard, and the declaration conflicts with the code included in
MySQL, NSPR, and SpiderMonkey.
mktemp was removed in POSIX.1-2001.
The qsort_r declarations are reordered so that the GNU version retains
precedence.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
strings. Compare a pointer to NULL rather than '\0'.
* dll_init.cc (dll_dllcrt0_1): Minor comment fix.
* pipe.cc (fhandler_pipe::create_selectable): Remove Win9x accommodation.
* autoload.cc (LocaleNameToLCID): Define.
* cygwin.din (strfmon): Export.
* nlsfuncs.cc: New file. Define a lot of internal functions called
from setlocale.
(wcscoll): Implement locale-aware here, using CompareStringW function.
(strcoll): Ditto.
(wcsxfrm): Implement locale-aware here, usingLCMapStringW function.
(strxfrm): Ditto.
(__set_charset_from_locale): Replace __set_charset_from_codepage.
Return Linux-compatible charset.
* strfuncs.cc (__set_charset_from_codepage): Remove.
* wchar.h (__set_charset_from_codepage): Drop definition.
* wincap.h (wincaps::has_localenames): New element.
* wincap.cc: Implement above element throughout.
* libc/strfmon.c: New file.
* libc/strptime.cc: Remove locale constant strings in favor of
access to locale-specifc data.
(strptime): Point _CurrentTimeLocale to locale-specific data.
Throughout use correct locale-specific format fields for all
locale-specific formats.
* include/monetary.h: New file.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.