4 * API declarations for POSIX.1-2008 string functions supported by MinGW.
8 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
9 * Copyright (C) 2015, MinGW.org Project.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice, this permission notice, and the following
20 * disclaimer shall be included in all copies or substantial portions of
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
29 * DEALINGS IN THE SOFTWARE.
34 #pragma GCC system_header
36 /* All MinGW system headers must include this...
41 /* POSIX.1-2008 requires this header to expose the typedef for size_t; to
42 * ensure consistency, we import this from GCC's own <stddef.h> header.
49 int __cdecl __MINGW_NOTHROW strcasecmp( const char *, const char * );
50 int __cdecl __MINGW_NOTHROW strncasecmp( const char *, const char *, size_t );
53 /* Provide in-line implementations for each of the preceding two functions,
54 * effectively aliasing them to their MSVCRT.DLL (non-standard) equivalents,
55 * (for which we maintain prototypes in <parts/strings.h>).
57 #include <parts/strings.h>
59 __CRT_ALIAS __JMPSTUB__(( FUNCTION = strcasecmp, REMAPPED = _stricmp ))
60 int strcasecmp( const char *__s1, const char *__s2 )
61 { return _stricmp( __s1, __s2 ); }
63 __CRT_ALIAS __JMPSTUB__(( FUNCTION = strncasecmp, REMAPPED = _strnicmp ))
64 int strncasecmp( const char *__s1, const char *__s2, size_t __n )
65 { return _strnicmp( __s1, __s2, __n ); }
67 #endif /* ! __NO_INLINE__ */
71 #endif /* ! RC_INVOKED */
72 #endif /* ! _STRINGS_H: $RCSfile$: end of file */