Codechange: replace strncasecmp with case ignoring variant of StrStarts/EndsWith
This commit is contained in:
17
src/stdafx.h
17
src/stdafx.h
@@ -37,10 +37,6 @@
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__HAIKU__) || defined(__CYGWIN__)
|
||||
# include <strings.h> /* strncasecmp */
|
||||
#endif
|
||||
|
||||
/* It seems that we need to include stdint.h before anything else
|
||||
* We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
|
||||
* does not have stdint.h.
|
||||
@@ -71,11 +67,6 @@
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(__OS2__)
|
||||
# include <types.h>
|
||||
# define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
/* Stuff for GCC */
|
||||
#if defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER))
|
||||
# define NORETURN __attribute__ ((noreturn))
|
||||
@@ -207,9 +198,6 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define strcasecmp stricmp
|
||||
# define strncasecmp strnicmp
|
||||
|
||||
/* MSVC doesn't have these :( */
|
||||
# define S_ISDIR(mode) (mode & S_IFDIR)
|
||||
# define S_ISREG(mode) (mode & S_IFREG)
|
||||
@@ -411,11 +399,6 @@ void NORETURN AssertFailedError(int line, const char *file, const char *expressi
|
||||
# define assert(expression) if (unlikely(!(expression))) AssertFailedError(__LINE__, __FILE__, #expression);
|
||||
#endif
|
||||
|
||||
#if defined(OPENBSD)
|
||||
/* OpenBSD uses strcasecmp(3) */
|
||||
# define _stricmp strcasecmp
|
||||
#endif
|
||||
|
||||
#if defined(MAX_PATH)
|
||||
/* It's already defined, no need to override */
|
||||
#elif defined(PATH_MAX) && PATH_MAX > 0
|
||||
|
Reference in New Issue
Block a user