@@ -94,50 +94,12 @@ typedef int errno_t;
9494#include <strings.h>
9595#endif /* HAVE_STRINGS_H */
9696
97- #if !defined(HAVE_SNPRINTF_H ) && defined(C89STRINGUTILS_IMPLEMENTATION )
98- #define HAVE_SNPRINTF_H
99- /*
100- * `snprintf`, `vsnprintf`, `strnstr` taken from:
101- * https://chromium.googlesource.com/chromium/blink/+/5cedd2fd208daf119b9ea47c7c1e22d760a586eb/Source/wtf/StringExtras.h
102- * …then modified to remove C++ specifics and WebKit specific macros
103- *
104- * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
105- * Copyright (C) 2020 Offscale.io. All rights reserved.
106- *
107- * SPDX-License-Identifier: BSD-2-Clause
108- */
109-
110- C89STRINGUTILS_EXPORT inline int snprintf (char * buffer , size_t count ,
111- const char * format , ...);
112-
113- C89STRINGUTILS_EXPORT inline double
114- wtf_vsnprintf (char * buffer , size_t count , const char * format , va_list args );
115-
116- /* Work around a difference in Microsoft's implementation of vsnprintf, where
117- vsnprintf does not null terminate the buffer. WebKit can rely on the null
118- termination. Microsoft's implementation is fixed in VS 2015. */
119- #define vsnprintf (buffer , count , format , args ) \
120- wtf_vsnprintf(buffer, count, format, args)
121-
122- #endif /* !defined(HAVE_SNPRINTF_H) && defined(C89STRINGUTILS_IMPLEMENTATION) \
123- */
124-
12597#ifndef HAVE_STRNCASECMP_H
12698
127- extern C89STRINGUTILS_EXPORT int strncasecmp (const char * , const char * ,
128- size_t );
99+ extern C89STRINGUTILS_EXPORT int strncasecmp (const char * , const char * , size_t );
129100
130101extern C89STRINGUTILS_EXPORT int strcasecmp (const char * , const char * );
131102
132- #if defined(C89STRINGUTILS_IMPLEMENTATION ) && !defined(HAVE_STRNCASECMP_H )
133- #define HAVE_STRNCASECMP_H
134-
135- #define strncasecmp _strnicmp
136- #define strcasecmp _stricmp
137-
138- #endif /* defined(C89STRINGUTILS_IMPLEMENTATION) && \
139- !defined(HAVE_STRNCASECMP_H) */
140-
141103#endif /* !HAVE_STRNCASECMP_H */
142104
143105#ifndef HAVE_STRNSTR
@@ -159,8 +121,7 @@ extern C89STRINGUTILS_EXPORT size_t strerrorlen_s(errno_t);
159121
160122#ifndef HAVE_ASPRINTF
161123
162- extern C89STRINGUTILS_EXPORT int vasprintf (char * * str , const char * fmt ,
163- va_list ap );
124+ extern C89STRINGUTILS_EXPORT int vasprintf (char * * str , const char * fmt , va_list ap );
164125
165126extern C89STRINGUTILS_EXPORT int asprintf (char * * str , const char * fmt , ...);
166127
0 commit comments