* ctype.cc: Remove implementation of ctype functions in favor of

pointer-based newlib implementation.
	(_ctype_b): Declare.
	(__ctype_cp): Move to newlib. Declare.
	(__ctype_iso): Ditto.
	(__set_ctype): Implement changing __ctype_ptr__.  Only copy character
	class data in applications built under older Cygwin.
	* cygwin.din (__ctype_ptr__): Export.
	* include/ctype.h: Remove in favor of newlib implementation.
	* include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
	* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
	Define check for old vs. new ctype implementation.
	Bump API minor number.
This commit is contained in:
Corinna Vinschen
2009-03-31 09:42:58 +00:00
parent 4bc42c05aa
commit a33fa76fed
6 changed files with 48 additions and 822 deletions

View File

@ -4,7 +4,7 @@
sys/config.h before. This way we can manaage our configuration
setting without bothering newlib.
Copyright 2003 Red Hat, Inc.
Copyright 2003, 2007, 2008, 2009 Red Hat, Inc.
Written by C. Vinschen.
This file is part of Cygwin.
@ -56,8 +56,10 @@ extern char *_tlsbase __asm__ ("%fs:4");
#define __USE_INTERNAL_STAT64 1
#endif
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
#define __EXPORT __declspec(dllexport)
#define __IMPORT
#else
#define __EXPORT
#define __IMPORT __declspec(dllimport)
#endif

View File

@ -95,6 +95,9 @@ details. */
#define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \
(CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 161)
#define CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE \
(CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 209)
/* API_MAJOR 0.0: Initial version. API_MINOR changes:
1: Export cygwin32_ calls as cygwin_ as well.
2: Export j1, jn, y1, yn.
@ -358,12 +361,13 @@ details. */
207: Export wcsdup.
208: Export log2, log2f.
209: Export wordexp, wordfree.
210: New ctype layout using variable ctype pointer. Export __ctype_ptr__.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 209
#define CYGWIN_VERSION_API_MINOR 210
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible