OSDN Git Service

Make strings.h mostly POSIX.1-2008 compliant.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 14 Sep 2015 15:38:35 +0000 (16:38 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 14 Sep 2015 15:38:35 +0000 (16:38 +0100)
mingwrt/ChangeLog
mingwrt/Makefile.in
mingwrt/include/parts/strings.h [new file with mode: 0644]
mingwrt/include/parts/wchar.h [new file with mode: 0644]
mingwrt/include/string.h
mingwrt/include/strings.h
mingwrt/include/wchar.h
mingwrt/strcasecmp.c [deleted file]
mingwrt/strncasecmp.c [deleted file]
mingwrt/wcscmpi.c [deleted file]

index 5737cab..e7f5b63 100644 (file)
@@ -1,3 +1,38 @@
+2015-09-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Make strings.h mostly POSIX.1-2008 compliant.
+
+       * include/strings.h: Rewritten.  Do not include...
+       (string.h): ...this; mandated by POSIX.1, it now defines...
+       (strcasecmp, strncasecmp): ...these POSIX.1 functions, complete with
+       prototypes, possible in-line implementations, and JMPSTUB references
+       to corresponding external implementations, which will now become
+       automatically created within libmingwex.a
+
+       * include/parts/strings.h: New file; it declares prototypes for...
+       (_stricmp, _strnicmp): ...these MSVC functions; nominally declared in
+       string.h, but we also require them in strings.h
+
+       * include/parts/wchar.h: New file; it declares prototypes for all wide
+       character functions which MSVC specifies in both wchar.h and string.h
+
+       * include/string.h: Miscellaneous layout adjustments.
+       (strcasecmp, strncasecmp): Delete; they belong in strings.h
+       (_stricmp, _strnicmp): Factor out; include them from parts/strings.h
+       [!_WSTRING_DEFINED]: Factor out all associated function prototypes;
+       include them from parts/wchar.h instead.
+
+       * include/wchar.h [!_WSTRING_DEFINED]: Delete all associated function
+       prototypes; include them from parts/wchar.h instead, so making this
+       guard macro redundant; delete it.
+
+       * Makefile.in (strcasecmp.$OBJEXT, strncasecmp.$OBJEXT)
+       (wcscmpi.$OBJEXT): Implementations are now automatically generated
+       from header file, for inclusion in libmingwex.a; remove free-standing
+       implementations from the entire family of liboldname libraries, and...
+       * strcasecmp.c strncasecmp.c wcscmpi.c: ...delete corresponding source
+       files; they are no longer required.
+
 2015-07-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Incorporate build system updates from w32api package.
index 28d46a4..0f7c3b0 100644 (file)
@@ -351,7 +351,7 @@ $(foreach name,coldname $(all_moldname),lib$(name).a): lib%.a: %.def
 # Microsoft DLLs, but which nevertheless are easily emulated.
 #
 $(foreach name,coldname $(all_moldname),lib$(name).a): $(addsuffix .$(OBJEXT), \
-  isascii iscsym iscsymf strcasecmp strncasecmp toascii wcscmpi)
+  isascii iscsym iscsymf toascii)
 
 coldname.def: %.def: ${mingwrt_srcdir}/moldname.def.in
        $(CC) -C -E -P -D__FILENAME__=$@ -D__CRTDLL__ -xc-header $< > $@
diff --git a/mingwrt/include/parts/strings.h b/mingwrt/include/parts/strings.h
new file mode 100644 (file)
index 0000000..99d6471
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * parts/strings.h
+ *
+ * Internal header file, declaring function prototypes which we require
+ * to be declared in our POSIX.1 conforming <strings.h> header, but for
+ * which MSVC expects to find declarations in <string.h>.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#if _FAKE_STRINGS_H_SOURCED
+/*
+ * Since we expect this part-header to be sourced exclusively by other
+ * system headers, (nominally <strings.h>), we don't apply any conventional
+ * multiple inclusion guard; rather, we rely on the guard within <strings.h>
+ * itself, but allow other headers to fake it for one-shot inclusion...
+ */
+# undef _FAKE_STRINGS_H_SOURCED
+
+#elif ! defined _STRINGS_H
+/*
+ * ...otherwise, we fail if the <strings.h> guard is not in place.
+ */
+# error "Never include <parts/strings.h> directly; use <strings.h> instead"
+#endif
+
+/* These are the MSVCRT.DLL equivalents for POSIX.1's strcasecmp() and
+ * strncasecmp() functions, for which we provide in-line implementations
+ * in <strings.h> respectively; MSVC expects to find these prototypes in
+ * <string.h>, but we also need them in <strings.h>.
+ */
+_CRTIMP int __cdecl __MINGW_NOTHROW  _stricmp( const char *, const char * );
+_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp( const char *, const char *, size_t );
+
+/* $RCSfile$: end of file */
diff --git a/mingwrt/include/parts/wchar.h b/mingwrt/include/parts/wchar.h
new file mode 100644 (file)
index 0000000..7b8e88d
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * parts/wchar.h
+ *
+ * Internal header file, declaring types and structures which nominally
+ * originate from <wchar.h>, but which POSIX, or MSVC, require to be made
+ * visible on inclusion of certain other headers, without inclusion of
+ * <wchar.h> itself.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#if _FAKE_WCHAR_H_SOURCED
+/*
+ * Since we expect this part-header to be sourced exclusively by other
+ * system headers, (nominally <wchar.h>), we don't apply any conventional
+ * multiple inclusion guard; rather, we rely on the guard within <wchar.h>
+ * itself, but allow other headers to fake it for one-shot inclusion...
+ */
+# undef _FAKE_WCHAR_H_SOURCED
+
+#elif ! defined _WCHAR_H
+/*
+ * ...otherwise, we fail if the <wchar.h> guard is not in place.
+ */
+# error "Never include <parts/wchar.h> directly; use <wchar.h> instead"
+#endif
+
+#if defined _WCHAR_H || defined __need_wstring_function_prototypes
+/*
+ * Wide character versions of the ISO-C standard string functions.
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcscat (wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcschr (const wchar_t *, wchar_t);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcscmp (const wchar_t *, const wchar_t *);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcscoll (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcscpy (wchar_t *, const wchar_t *);
+_CRTIMP size_t    __cdecl __MINGW_NOTHROW  wcscspn (const wchar_t *, const wchar_t *);
+_CRTIMP size_t    __cdecl __MINGW_NOTHROW  wcslen (const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsncat (wchar_t *, const wchar_t *, size_t);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcsncmp (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsncpy (wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcspbrk (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsrchr (const wchar_t *, wchar_t);
+_CRTIMP size_t    __cdecl __MINGW_NOTHROW  wcsspn (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsstr (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcstok (wchar_t *, const wchar_t *);
+_CRTIMP size_t    __cdecl __MINGW_NOTHROW  wcsxfrm (wchar_t *, const wchar_t *, size_t);
+
+#ifndef __STRICT_ANSI__
+/* UTF-16LE versions of non-ANSI string functions provided by CRTDLL.
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcsdup (const wchar_t *);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  _wcsicmp (const wchar_t *, const wchar_t *);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  _wcsicoll (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcslwr (wchar_t*);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  _wcsnicmp (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcsnset (wchar_t *, wchar_t, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcsrev (wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcsset (wchar_t *, wchar_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcsupr (wchar_t *);
+
+#ifdef __MSVCRT__
+_CRTIMP int       __cdecl __MINGW_NOTHROW  _wcsncoll (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  _wcsnicoll (const wchar_t *, const wchar_t *, size_t);
+
+/* A wide character counterpart to the strerror() API was introduced in
+ * MSVCR70.DLL, and subsequently back-ported to MSVCRT.DLL in WinXP.
+ */
+#if __MSVCRT_VERSION__ >= __MSVCR70_DLL || NTDDI_VERSION >= NTDDI_WINXP
+ /*
+  * These are are the wide character counterparts to the strerror()
+  * function itself, and the _strerror() function, respectively.
+  */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  _wcserror (int);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW __wcserror (const wchar_t *);
+
+#endif /* MSVCR70.DLL / WinXP */
+#endif /* __MSVCRT__ */
+
+/* MSVCRT.DLL provides neither _wcscmpi() nor wcscmpi(); the heritage
+ * is uncertain, but for the convenience, (and portability), of legacy
+ * applications which assume wcscmpi() should be available:
+ */
+#define _wcscmpi _wcsicmp
+int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
+
+#if ! defined __NO_INLINE__ && ! defined __have_wcscmpi
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = wcscmpi, REMAPPED = _wcsicmp ))
+  int wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
+  { return _wcsicmp (__ws1, __ws2); }
+
+# define __have_wcscmpi
+#endif
+
+#ifndef _NO_OLDNAMES
+ /* Older CRTDLL versions may have provided these alternatively named
+  * functions; we continue to support them, via the OLDNAME libraries:
+  */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsdup (const wchar_t*);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcsicmp (const wchar_t*, const wchar_t*);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcsicoll (const wchar_t*, const wchar_t*);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcslwr (wchar_t*);
+_CRTIMP int       __cdecl __MINGW_NOTHROW  wcsnicmp (const wchar_t*, const wchar_t*, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsnset (wchar_t*, wchar_t, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsrev (wchar_t*);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsset (wchar_t*, wchar_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW  wcsupr (wchar_t*);
+
+#endif /* ! _NO_OLDNAMES */
+
+#endif /* ! __STRICT_ANSI__ */
+#endif /* __need_wstring_function_prototypes */
+
+/* $RCSfile$: end of file */
index 2680d0a..9b68f08 100644 (file)
 /*
  * string.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
  *
- * Definitions for memory and string functions.
+ * ISO-C standard header, with MSVC compatible extensions.
+ *
+ * $Id$
+ *
+ * Written by Rob Savoye <rob@cygnus.com>
+ * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  *
  */
+#ifndef _STRING_H
+#define _STRING_H
 
-#ifndef _STRING_H_
-#define        _STRING_H_
-
-/* All the headers include this file. */
+/* All MinGW system headers must include this...
+ */
 #include <_mingw.h>
 
-/*
- * Define size_t, wchar_t and NULL
+#ifndef RC_INVOKED
+/* ISO-C requires this header to expose definitions for NULL and size_t,
+ * retaining compatiblity with their fundamental <stddef.h> definitions.
  */
+#define __need_NULL
 #define __need_size_t
-#define __need_wchar_t
-#define        __need_NULL
-#ifndef RC_INVOKED
+#ifndef __STRICT_ANSI__
+ /* MSVC extends this requirement to include a definition of wchar_t,
+  * (which contravenes strict ISO-C standards conformity).
+  */
+# define __need_wchar_t
+#endif
 #include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#ifndef RC_INVOKED
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+_BEGIN_C_DECLS
 
-/*
- * Prototypes of the ANSI Standard C library string functions.
+/* Prototypes for the ISO-C Standard library string functions.
  */
-_CRTIMP void* __cdecl __MINGW_NOTHROW  memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW    memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP void* __cdecl __MINGW_NOTHROW  memcpy (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW  memmove (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW  memset (void*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strcat (char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strchr (const char*, int)  __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW    strcmp (const char*, const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW    strcoll (const char*, const char*);     /* Compare using locale */
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strcpy (char*, const char*);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP int    __cdecl __MINGW_NOTHROW         memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP void * __cdecl __MINGW_NOTHROW         memcpy (void*, const void*, size_t);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memset (void*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strcat (char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strchr (const char*, int)  __MINGW_ATTRIB_PURE;
+_CRTIMP int    __cdecl __MINGW_NOTHROW strcmp (const char*, const char*)  __MINGW_ATTRIB_PURE;
+_CRTIMP int    __cdecl __MINGW_NOTHROW strcoll (const char*, const char*);     /* Compare using locale */
+_CRTIMP char * __cdecl __MINGW_NOTHROW strcpy (char*, const char*);
 _CRTIMP size_t __cdecl __MINGW_NOTHROW strcspn (const char*, const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strerror (int); /* NOTE: NOT an old name wrapper. */
+_CRTIMP char * __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */
 
 _CRTIMP size_t __cdecl __MINGW_NOTHROW strlen (const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strncat (char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    strncmp (const char*, const char*, size_t)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strncpy (char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strpbrk (const char*, const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strrchr (const char*, int)  __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t);
+_CRTIMP int    __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t)  __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*)  __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strrchr (const char*, int)  __MINGW_ATTRIB_PURE;
 _CRTIMP size_t __cdecl __MINGW_NOTHROW strspn (const char*, const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strstr (const char*, const char*)  __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strtok (char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strstr (const char*, const char*)  __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strtok (char*, const char*);
 _CRTIMP size_t __cdecl __MINGW_NOTHROW strxfrm (char*, const char*, size_t);
 
 #ifndef __STRICT_ANSI__
 /*
  * Extra non-ANSI functions provided by the CRTDLL library
  */
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strerror (const char *);
-_CRTIMP void* __cdecl __MINGW_NOTHROW  _memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW    _strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _stricmp (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _strnicmp (const char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  _strupr (char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW   _swab (const char*, char*, size_t);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW  _strncoll(const char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW  _strnicoll(const char*, const char*, size_t);
-#endif
-
-#ifndef        _NO_OLDNAMES
-/*
- * Non-underscored versions of non-ANSI functions. They live in liboldnames.a
- * and provide a little extra portability. Also a few extra UNIX-isms like
- * strcasecmp.
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strerror (const char *);
+_CRTIMP void * __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t);
+_CRTIMP int    __cdecl __MINGW_NOTHROW         _memicmp (const void*, const void*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW         _strdup (const char*) __MINGW_ATTRIB_MALLOC;
+_CRTIMP int    __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*);
+_CRTIMP int    __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strlwr (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strrev (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strset (char*, int);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strupr (char*);
+_CRTIMP void   __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t);
+
+/* MSVC's non-ANSI _stricmp() and _strnicmp() functions must also be
+ * prototyped here, but we need to share them with <strings.h>, where
+ * we declare their POSIX strcasecmp() and strncasecmp() equivalents.
  */
-_CRTIMP void* __cdecl __MINGW_NOTHROW  memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW    strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    stricmp (const char*, const char*);
-int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strcasecmp (const char * __sz1, const char * __sz2)
-  {return _stricmp (__sz1, __sz2);}
-#endif
-_CRTIMP int __cdecl __MINGW_NOTHROW    stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    strnicmp (const char*, const char*, size_t);
-int  __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
-  {return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}
-#endif
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW  strupr (char*);
-#ifndef _UWIN
-_CRTIMP void __cdecl __MINGW_NOTHROW   swab (const char*, char*, size_t);
-#endif /* _UWIN */
-#endif /* _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard calls.
- * Also in wchar.h, where they belong according to ISO standard.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note:  _wcserror requires __MSVCRT_VERSION__ >= 0x0700.  */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef        __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI string functions provided by CRTDLL.
- */
-
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define                _wcscmpi        _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW  _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int   __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef        _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
-  {return _wcsicmp (__ws1, __ws2);}
-#endif
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif  /* _WSTRING_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STRING_H_ */
+#define _FAKE_STRINGS_H_SOURCED 1
+#include <parts/strings.h>
+
+# ifdef __MSVCRT__
+ /* These were not present in the CRTDLL prior to the first release of
+  * MSVCRT.DLL, but are available in all versions of that library.
+  */
+_CRTIMP int    __cdecl __MINGW_NOTHROW  _strncoll(const char*, const char*, size_t);
+_CRTIMP int    __cdecl __MINGW_NOTHROW  _strnicoll(const char*, const char*, size_t);
+# endif
+
+# ifndef _NO_OLDNAMES
+ /* Non-underscore decorated versions of non-ANSI functions. They live in the
+  * OLDNAMES libraries, whence they provide a little extra portability.
+  */
+_CRTIMP void * __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t);
+_CRTIMP int    __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
+_CRTIMP int    __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
+_CRTIMP int    __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
+_CRTIMP int    __cdecl __MINGW_NOTHROW stricoll (const char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strlwr (char*);
+_CRTIMP int    __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strnset (char*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strrev (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strset (char*, int);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strupr (char*);
+
+#  ifndef _UWIN
+  /* FIXME: Do we really care that UWin doesn't support this?  We are
+   * under no obligation to support UWin.
+   */
+_CRTIMP void   __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t);
+
+#  endif /* ! _UWIN */
+# endif /* ! _NO_OLDNAMES */
+
+# define _FAKE_WCHAR_H_SOURCED 1
+# define __need_wstring_function_prototypes
+ /* This inclusion of <wchar.h> string function prototypes is required for
+  * MSVC <string.h> compatibility.  Strictly conforming ISO-C applications
+  * should include <wchar.h>; they should not rely on this anomaly.
+  */
+# include <parts/wchar.h>
+
+#endif /* ! __STRICT_ANSI__ */
+
+_END_C_DECLS
+
+#endif /* ! RC_INVOKED */
+#endif /* ! _STRING_H: $RCSfile$: end of file */
index 5342276..1a2cb52 100644 (file)
@@ -1,12 +1,72 @@
 /*
-    File: strings.h
-    Copyright: Public Domain
-
-    This file is provided because non ANSI fuctions are described in string.h
-    that belong in strings.h.  These functions are provided for in the OLDNAME
-    libraries.
-*/
-#if !defined(_STRINGS_H_)
-# define _STRINGS_H_ 1
-# include <string.h>
-#endif
+ * strings.h
+ *
+ * API declarations for POSIX.1-2008 string functions supported by MinGW.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _STRINGS_H
+#define _STRINGS_H
+#pragma GCC system_header
+
+/* All MinGW system headers must include this...
+ */
+#include <_mingw.h>
+
+#ifndef RC_INVOKED
+/* POSIX.1-2008 requires this header to expose the typedef for size_t; to
+ * ensure consistency, we import this from GCC's own <stddef.h> header.
+ */
+#define __need_size_t
+#include <stddef.h>
+
+_BEGIN_C_DECLS
+
+int __cdecl __MINGW_NOTHROW strcasecmp( const char *, const char * );
+int __cdecl __MINGW_NOTHROW strncasecmp( const char *, const char *, size_t );
+
+#ifndef __NO_INLINE__
+/* Provide in-line implementations for each of the preceding two functions,
+ * effectively aliasing them to their MSVCRT.DLL (non-standard) equivalents,
+ * (for which we maintain prototypes in <parts/strings.h>).
+ */
+#include <parts/strings.h>
+
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = strcasecmp, REMAPPED = _stricmp ))
+  int strcasecmp( const char *__s1, const char *__s2 )
+  { return _stricmp( __s1, __s2 ); }
+
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = strncasecmp, REMAPPED = _strnicmp ))
+  int strncasecmp( const char *__s1, const char *__s2, size_t __n )
+  { return _strnicmp( __s1, __s2, __n ); }
+
+#endif /* ! __NO_INLINE__ */
+
+_END_C_DECLS
+
+#endif /* ! RC_INVOKED */
+#endif /* ! _STRINGS_H: $RCSfile$: end of file */
index 76b9043..3ab0830 100644 (file)
@@ -220,79 +220,13 @@ _CRTIMP size_t __cdecl __MINGW_NOTHROW    wcsftime (wchar_t*, size_t, const wchar_t
 #endif /* _WTIME_DEFINED */
 
 
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard string calls.
- * Also in string.h.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note:  _wcserror requires __MSVCRT_VERSION__ >= 0x0700.  */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef        __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI functions provided by CRTDLL.
+/* Wide character string functions must be specified here, as required
+ * by the ISO-C Standard; however, MSVC contravenes this standard by also
+ * requiring them to appear in <string.h>, so we specify them in a shared
+ * <parts/wchar.h> header, which we may include both here and in <string.h>
  */
+#include <parts/wchar.h>
 
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define                _wcscmpi        _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW  _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int   __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef        _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
-  {return _wcsicmp (__ws1, __ws2);}
-#endif
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif  /* _WSTRING_DEFINED */
 
 /* These are resolved by -lmingwex. Alternatively, they can be resolved by
    adding -lmsvcp60 to your command line, which will give you the VC++
diff --git a/mingwrt/strcasecmp.c b/mingwrt/strcasecmp.c
deleted file mode 100644 (file)
index a238e22..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strcasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strcasecmp (const char *sz1, const char *sz2)
-{
-  return _stricmp (sz1, sz2);
-}
-
diff --git a/mingwrt/strncasecmp.c b/mingwrt/strncasecmp.c
deleted file mode 100644 (file)
index 7607ea1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strncasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare)
-{
-  return _strnicmp (sz1, sz2, sizeMaxCompare);
-}
-
diff --git a/mingwrt/wcscmpi.c b/mingwrt/wcscmpi.c
deleted file mode 100644 (file)
index 497964b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * wcscmpi.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-wcscmpi (const wchar_t * ws1, const wchar_t * ws2)
-{
-  return _wcsicmp (ws1, ws2);
-}
-