mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
os: drop own implementation of strcasecmp() and strncasecmp()
These are POSIX standard since 2001, so shouldn't be needed anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -169,11 +169,9 @@ conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false)
|
||||
conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false)
|
||||
# HAVE_SOCKLEN_T is used by xtrans when IPv6 is disabled
|
||||
conf_data.set('HAVE_SOCKLEN_T', cc.has_type('socklen_t', prefix: '#include <sys/socket.h>') ? '1' : false)
|
||||
conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false)
|
||||
conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false)
|
||||
conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false)
|
||||
conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep) ? '1' : false)
|
||||
conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp') ? '1' : false)
|
||||
conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup') ? '1' : false)
|
||||
# HAVE_STRUCT_SOCKADDR_STORAGE is used by xtrans >= 1.6
|
||||
conf_data.set('HAVE_STRUCT_SOCKADDR_STORAGE', cc.has_type('struct sockaddr_storage', prefix: '#include <sys/socket.h>') ? '1' : false)
|
||||
|
||||
12
include/os.h
12
include/os.h
@@ -234,18 +234,6 @@ extern _X_EXPORT void *
|
||||
reallocarray(void *optr, size_t nmemb, size_t size);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#define strcasecmp xstrcasecmp
|
||||
extern _X_EXPORT int
|
||||
xstrcasecmp(const char *s1, const char *s2);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
#define strncasecmp xstrncasecmp
|
||||
extern _X_EXPORT int
|
||||
xstrncasecmp(const char *s1, const char *s2, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
#define strcasestr xstrcasestr
|
||||
extern _X_EXPORT char *
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
/* Define to 1 if you have the `reallocarray' function. */
|
||||
#mesondefine HAVE_REALLOCARRAY
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#mesondefine HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strcasestr' function. */
|
||||
#mesondefine HAVE_STRCASESTR
|
||||
|
||||
@@ -50,9 +47,6 @@
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#mesondefine HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#mesondefine HAVE_STRNCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strndup' function. */
|
||||
#mesondefine HAVE_STRNDUP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user