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-06-02 13:41:06 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-06-02 13:41:06 +0400
commite17c0a23e32e35d037e75e21389c485c4fded87d (patch)
tree83729070978e05b1783eba0b0afc7febae73c811 /newlib/libc/ctype
parent6f15a1a0f54cd7d5739f91a70e9f2543172b8d10 (diff)
* libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
(__jp2uc): Change the scope to static function. * libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__. * libc/string/local.h (_jp2uc): Include ../ctype/local.h.
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r--newlib/libc/ctype/jp2uc.c10
-rw-r--r--newlib/libc/ctype/local.h7
2 files changed, 11 insertions, 6 deletions
diff --git a/newlib/libc/ctype/jp2uc.c b/newlib/libc/ctype/jp2uc.c
index 77443b8ff..0b0085f15 100644
--- a/newlib/libc/ctype/jp2uc.c
+++ b/newlib/libc/ctype/jp2uc.c
@@ -32,6 +32,9 @@
#include <newlib.h>
#ifdef _MB_CAPABLE
+/* Under Cygwin, the incoming wide character is already given in UTF due
+ to the requirements of the underlying OS. */
+#ifndef __CYGWIN__
#include <_ansi.h>
#include <wctype.h>
@@ -43,7 +46,7 @@
#define JP_SJIS 2
#define JP_EUCJP 3
-wint_t
+static wint_t
_DEFUN (__jp2uc, (c, type), wint_t c _AND int type)
{
int index, adj;
@@ -150,17 +153,14 @@ _DEFUN (__jp2uc, (c, type), wint_t c _AND int type)
wint_t
_DEFUN (_jp2uc, (c), wint_t c)
{
-/* Under Cygwin, the incoming wide character is already given in UTF due
- to the requirements of the underlying OS. */
-#ifndef __CYGWIN__
if (!strcmp (__locale_charset (), "JIS"))
c = __jp2uc (c, JP_JIS);
else if (!strcmp (__locale_charset (), "SJIS"))
c = __jp2uc (c, JP_SJIS);
else if (!strcmp (__locale_charset (), "EUCJP"))
c = __jp2uc (c, JP_EUCJP);
-#endif
return c;
}
+#endif /* !__CYGWIN__ */
#endif /* _MB_CAPABLE */
diff --git a/newlib/libc/ctype/local.h b/newlib/libc/ctype/local.h
index ab1c7db71..7dac35403 100644
--- a/newlib/libc/ctype/local.h
+++ b/newlib/libc/ctype/local.h
@@ -23,5 +23,10 @@
extern char *__locale_charset ();
/* internal function to translate JP to Unicode */
+#ifdef __CYGWIN__
+/* Under Cygwin, the incoming wide character is already given in UTF due
+ to the requirements of the underlying OS. */
+#define _jp2uc(c) (c)
+#else
wint_t _EXFUN (_jp2uc, (wint_t));
-
+#endif