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>2007-12-12 15:12:24 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-12-12 15:12:24 +0300
commit1feea0bfd74d260dcd52618edec238808ada47ac (patch)
tree557b28e8036ca44a53ffd481e14d8033a64a9f6d /winsup/cygwin/string.h
parent5c80ea02302e031225003689df63eb206d248a35 (diff)
* dcrt0.cc: Include string.h.
(initial_env): Use small_printf's %P specifier. * dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * dll_init.h (struct dll): Ditto. * environ.cc: Include string.h. (win_env::add_cache): Use temporary local buffer for path conversion. (posify): Ditto. * exceptions.cc (try_to_debug): Use CreateProcessW to allow long path names. * miscfuncs.cc: Drop unused implementations of strcasematch and strncasematch. (ch_case_eq): Drop. (strcasestr): Drop. (cygwin_wcscasecmp): New function. (cygwin_wcsncasecmp): New function. (cygwin_strcasecmp): New function. (cygwin_strncasecmp): New function. (cygwin_wcslwr): New function. (cygwin_wcsupr): New function. (cygwin_strlwr): New function. (cygwin_strupr): New function. * ntdll.h (RtlDowncaseUnicodeString): Declare. (RtlUpcaseUnicodeString): Declare. (RtlInt64ToHexUnicodeString): Fix typo in comment. * string.h: Disable not NLS aware implementations of strcasematch and strncasematch. (cygwin_strcasecmp): Declare. (strcasecmp): Define as cygwin_strcasecmp. (cygwin_strncasecmp): Declare. (strncasecmp): Define as cygwin_strncasecmp. (strcasematch):Define using cygwin_strcasecmp. (strncasematch):Define using cygwin_strncasecmp. (cygwin_strlwr): Declare. (strlwr): Define as cygwin_strlwr. (cygwin_strupr): Declare. (strupr): Define as cygwin_strupr. * wchar.h: New file. * wincap.cc (wincapc::init): Use "NT" as fix OS string. * winsup.h (strcasematch): Drop declaration. (strncasematch): Ditto. (strcasestr): Ditto.
Diffstat (limited to 'winsup/cygwin/string.h')
-rw-r--r--winsup/cygwin/string.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/winsup/cygwin/string.h b/winsup/cygwin/string.h
index 1ad902134..ee831191e 100644
--- a/winsup/cygwin/string.h
+++ b/winsup/cygwin/string.h
@@ -1,6 +1,6 @@
/* string.h: Extra string defs
- Copyright 2001 Red Hat, Inc.
+ Copyright 2001, 2007 Red Hat, Inc.
This file is part of Cygwin.
@@ -59,6 +59,8 @@ strechr (const char *s, int c)
return res;
}
+/* Don't use. Not NLS aware. */
+#if 0 // Not NLS aware
extern const char isalpha_array[];
#undef strcasematch
@@ -122,6 +124,26 @@ cygwin_strncasematch (const char *cs, const char *ct, size_t n)
return __res;
}
+#else
+#undef strcasecmp
+#define strcasecmp cygwin_strcasecmp
+int __stdcall cygwin_strcasecmp (const char *, const char *);
+
+#undef strncasecmp
+#define strncasecmp cygwin_strncasecmp
+int __stdcall cygwin_strncasecmp (const char *, const char *, size_t);
+
+#define strcasematch(s1,s2) (!cygwin_strcasecmp ((s1),(s2)))
+#define strncasematch(s1,s2,n) (!cygwin_strncasecmp ((s1),(s2),(n)))
+#endif
+
+#undef strlwr
+#define strlwr cygwin_strlwr
+char * __stdcall cygwin_strlwr (char *);
+
+#undef strupr
+#define strupr cygwin_strupr
+char * __stdcall cygwin_strupr (char *);
#ifdef __cplusplus
}