Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-03-31 13:31:38 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-03-31 13:31:38 +0400
commit4bc42c05aa0921f57e401985458ef8e584fa8777 (patch)
tree68783798c495590d87169ccb42807fcd8da9d401 /newlib/libc/locale/locale.c
parent24bd1f86c27b5d25a12e42da286ba983cc4d7ef8 (diff)
* libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
source files. Add a dependency rule for ctype_o to note changes in ctype_iso.h and ctype_cp.h. * libc/ctype/Makefile.in: Regenerate. * libc/ctype/_tolower.c: Remove file. * libc/ctype/_toupper.c: Remove file. * libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX is always defined on Cygwin. (_ctype_b): Don't make `static const' on Cygwin. (ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set. (ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set. (__ctype_ptr): Drop definition. (__ctype_ptr__): De-constify. Mark as __EXPORT symbol. (_ctype_): Add Cygwin-specifc asm define. (__set_ctype): New function to set __ctype_ptr__ according to current charset. * libc/ctype/ctype_cp.h: New file containing Windows codepage specific character class tables. * libc/ctype/ctype_iso.h: New file containing ISO-8859-x specific character class tables. * libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte charset if one of the extended charsets is enabled. * libc/ctype/toupper.c (toupper): Ditto. * libc/include/ctype.h (_tolower): Define as macro per POSIX. (_toupper): Ditto. (__ctype_ptr__): De-constify. (toupper): Disable macro on systems supporting extended charsets. (tolower): Ditto. * libc/include/sys/config.h (__EXPORT): Define empty if not defined. * libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol. (__set_ctype): Declare unconditionally. (loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r--newlib/libc/locale/locale.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 24d285bf7..e93f78021 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -149,11 +149,7 @@ No supporting OS subroutines are required.
#define _LC_LAST 7
#define ENCODING_LEN 31
-#ifdef __CYGWIN__
-int __declspec(dllexport) __mb_cur_max = 1;
-#else
-int __mb_cur_max = 1;
-#endif
+int __EXPORT __mb_cur_max = 1;
int __nlocale_changed = 0;
int __mlocale_changed = 0;
@@ -377,9 +373,10 @@ currentlocale()
#ifdef _MB_CAPABLE
#ifdef __CYGWIN__
extern void *__set_charset_from_codepage (unsigned int, char *charset);
-extern void __set_ctype (const char *charset);
#endif /* __CYGWIN__ */
+extern void __set_ctype (const char *charset);
+
static char *
loadlocale(struct _reent *p, int category)
{
@@ -604,10 +601,8 @@ loadlocale(struct _reent *p, int category)
#ifdef _MB_CAPABLE
__wctomb = l_wctomb;
__mbtowc = l_mbtowc;
-#ifdef __CYGWIN__
__set_ctype (charset);
#endif
-#endif
}
else if (category == LC_MESSAGES)
strcpy (lc_message_charset, charset);