diff options
author | bulatman <bulatman@yandex-team.ru> | 2022-02-10 16:45:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:50 +0300 |
commit | 2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /contrib/libs | |
parent | 6560e4993b14d193f8c879e33a3de5e5eba6e21d (diff) | |
download | ydb-2f6ca198245aeffd5e2d82b65927c2465b68b4f5.tar.gz |
Restoring authorship annotation for <bulatman@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs')
22 files changed, 320 insertions, 320 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/ya.make b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/ya.make index 111d6897eb..d6b0823d45 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/ya.make +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/ya.make @@ -35,7 +35,7 @@ CFLAGS( -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT - -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT + -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT -DAWS_IO_USE_IMPORT_EXPORT -DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=8 diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/ya.make b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/ya.make index 0d67d74859..df8594d6cc 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/ya.make +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/ya.make @@ -31,7 +31,7 @@ CFLAGS( -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT - -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT + -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT -DAWS_IO_USE_IMPORT_EXPORT -DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=8 diff --git a/contrib/libs/aws-sdk-cpp/ya.make b/contrib/libs/aws-sdk-cpp/ya.make index 8bce38ae4b..d9fcb0818d 100644 --- a/contrib/libs/aws-sdk-cpp/ya.make +++ b/contrib/libs/aws-sdk-cpp/ya.make @@ -1,6 +1,6 @@ # Generated by devtools/yamaker from nixpkgs 980c4c3c2f664ccc5002f7fd6e08059cf1f00e75. -OWNER(orivej shindo g:cpp-contrib) +OWNER(orivej shindo g:cpp-contrib) VERSION(1.8.113) diff --git a/contrib/libs/c-ares/acountry/ya.make b/contrib/libs/c-ares/acountry/ya.make index 168161566f..58b533d30c 100644 --- a/contrib/libs/c-ares/acountry/ya.make +++ b/contrib/libs/c-ares/acountry/ya.make @@ -16,10 +16,10 @@ ADDINCL( NO_COMPILER_WARNINGS() -CFLAGS( - -DHAVE_CONFIG_H -) - +CFLAGS( + -DHAVE_CONFIG_H +) + SRCDIR(contrib/libs/c-ares) IF (NOT DLL_FOR) diff --git a/contrib/libs/c-ares/adig/ya.make b/contrib/libs/c-ares/adig/ya.make index 0d58aa1834..1c8404ebee 100644 --- a/contrib/libs/c-ares/adig/ya.make +++ b/contrib/libs/c-ares/adig/ya.make @@ -16,10 +16,10 @@ ADDINCL( NO_COMPILER_WARNINGS() -CFLAGS( - -DHAVE_CONFIG_H -) - +CFLAGS( + -DHAVE_CONFIG_H +) + SRCDIR(contrib/libs/c-ares) IF (NOT DLL_FOR) diff --git a/contrib/libs/c-ares/ahost/ya.make b/contrib/libs/c-ares/ahost/ya.make index 7ec79eff39..299e3f211c 100644 --- a/contrib/libs/c-ares/ahost/ya.make +++ b/contrib/libs/c-ares/ahost/ya.make @@ -16,10 +16,10 @@ ADDINCL( NO_COMPILER_WARNINGS() -CFLAGS( - -DHAVE_CONFIG_H -) - +CFLAGS( + -DHAVE_CONFIG_H +) + SRCDIR(contrib/libs/c-ares) IF (NOT DLL_FOR) diff --git a/contrib/libs/c-ares/config-win32.h b/contrib/libs/c-ares/config-win32.h index 576477e25d..da7eba44d8 100644 --- a/contrib/libs/c-ares/config-win32.h +++ b/contrib/libs/c-ares/config-win32.h @@ -72,12 +72,12 @@ #define HAVE_WS2TCPIP_H 1 #endif -/* Define to 1 if you have the <sys/uio.h> header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the writev function. */ -#define HAVE_WRITEV 1 - +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV 1 + /* ---------------------------------------------------------------- */ /* OTHER HEADER INFO */ /* ---------------------------------------------------------------- */ diff --git a/contrib/libs/c-ares/test/ares-test-internal.cc b/contrib/libs/c-ares/test/ares-test-internal.cc index 92aad0067e..96d4edece5 100644 --- a/contrib/libs/c-ares/test/ares-test-internal.cc +++ b/contrib/libs/c-ares/test/ares-test-internal.cc @@ -578,7 +578,7 @@ const struct ares_socket_functions VirtualizeIO::default_functions = { #endif }, [](ares_socket_t s, const struct iovec * vec, int len, void *) { -#ifndef HAVE_WRITEV +#ifndef HAVE_WRITEV return ares_writev(s, vec, len); #else return :: writev(s, vec, len); diff --git a/contrib/libs/c-ares/test/ya.make b/contrib/libs/c-ares/test/ya.make index f2b421e92b..ef42eab230 100644 --- a/contrib/libs/c-ares/test/ya.make +++ b/contrib/libs/c-ares/test/ya.make @@ -23,10 +23,10 @@ ADDINCL( NO_COMPILER_WARNINGS() -CFLAGS( - -DHAVE_CONFIG_H -) - +CFLAGS( + -DHAVE_CONFIG_H +) + IF (NOT DLL_FOR) CFLAGS( -DCARES_STATICLIB diff --git a/contrib/libs/c-ares/ya.make b/contrib/libs/c-ares/ya.make index fd6d1a87ea..bd35762e44 100644 --- a/contrib/libs/c-ares/ya.make +++ b/contrib/libs/c-ares/ya.make @@ -20,10 +20,10 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -PEERDIR( - contrib/libs/libc_compat -) - +PEERDIR( + contrib/libs/libc_compat +) + ADDINCL( contrib/libs/c-ares ) @@ -33,7 +33,7 @@ NO_COMPILER_WARNINGS() CFLAGS( -DCARES_BUILDING_LIBRARY -DCARES_SYMBOL_HIDING - -DHAVE_CONFIG_H + -DHAVE_CONFIG_H ) IF (NOT DLL_FOR) diff --git a/contrib/libs/fmt/test/ya.make b/contrib/libs/fmt/test/ya.make index 499a71ee4d..8db82d6c1e 100644 --- a/contrib/libs/fmt/test/ya.make +++ b/contrib/libs/fmt/test/ya.make @@ -13,7 +13,7 @@ LICENSE(MIT) PEERDIR( contrib/libs/fmt - contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googlemock ) NO_COMPILER_WARNINGS() diff --git a/contrib/libs/grpc/test/cpp/end2end/ya.make b/contrib/libs/grpc/test/cpp/end2end/ya.make index aaacb631ae..b9c1dc7fe0 100644 --- a/contrib/libs/grpc/test/cpp/end2end/ya.make +++ b/contrib/libs/grpc/test/cpp/end2end/ya.make @@ -12,8 +12,8 @@ PEERDIR( contrib/libs/grpc/src/proto/grpc/testing/duplicate contrib/libs/grpc/test/cpp/util contrib/libs/grpc - contrib/restricted/googletest/googlemock - contrib/restricted/googletest/googletest + contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googletest ) ADDINCL( diff --git a/contrib/libs/grpc/test/cpp/util/ya.make b/contrib/libs/grpc/test/cpp/util/ya.make index d534006a54..f043cc5b14 100644 --- a/contrib/libs/grpc/test/cpp/util/ya.make +++ b/contrib/libs/grpc/test/cpp/util/ya.make @@ -10,8 +10,8 @@ PEERDIR( contrib/libs/gflags contrib/libs/protoc contrib/libs/grpc/src/proto/grpc/reflection/v1alpha - contrib/restricted/googletest/googlemock - contrib/restricted/googletest/googletest + contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googletest ) ADDINCL( diff --git a/contrib/libs/libc_compat/memrchr.c b/contrib/libs/libc_compat/memrchr.c index 6d48918d81..ff3048759f 100644 --- a/contrib/libs/libc_compat/memrchr.c +++ b/contrib/libs/libc_compat/memrchr.c @@ -1,39 +1,39 @@ -/* $OpenBSD: memrchr.c,v 1.4 2019/01/25 00:19:25 millert Exp $ */ - -/* - * Copyright (c) 2007 Todd C. Miller <millert@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <string.h> - -/* - * Reverse memchr() - * Find the last occurrence of 'c' in the buffer 's' of size 'n'. - */ -void * -memrchr(const void *s, int c, size_t n) -{ - const unsigned char *cp; - - if (n != 0) { - cp = (unsigned char *)s + n; - do { - if (*(--cp) == (unsigned char)c) - return((void *)cp); - } while (--n != 0); - } - return(NULL); -} - +/* $OpenBSD: memrchr.c,v 1.4 2019/01/25 00:19:25 millert Exp $ */ + +/* + * Copyright (c) 2007 Todd C. Miller <millert@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include <string.h> + +/* + * Reverse memchr() + * Find the last occurrence of 'c' in the buffer 's' of size 'n'. + */ +void * +memrchr(const void *s, int c, size_t n) +{ + const unsigned char *cp; + + if (n != 0) { + cp = (unsigned char *)s + n; + do { + if (*(--cp) == (unsigned char)c) + return((void *)cp); + } while (--n != 0); + } + return(NULL); +} + diff --git a/contrib/libs/libc_compat/stpcpy.c b/contrib/libs/libc_compat/stpcpy.c index 5a4ec0929a..5a86541f08 100644 --- a/contrib/libs/libc_compat/stpcpy.c +++ b/contrib/libs/libc_compat/stpcpy.c @@ -1,44 +1,44 @@ -/* $OpenBSD: stpcpy.c,v 1.3 2017/11/28 06:55:49 tb Exp $ */ - -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <string.h> - -#if defined(APIWARN) -__warn_references(stpcpy, - "stpcpy() is dangerous; do not use it"); -#endif - -char * -stpcpy(char *to, const char *from) -{ - for (; (*to = *from) != '\0'; ++from, ++to); - return(to); -} +/* $OpenBSD: stpcpy.c,v 1.3 2017/11/28 06:55:49 tb Exp $ */ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <string.h> + +#if defined(APIWARN) +__warn_references(stpcpy, + "stpcpy() is dangerous; do not use it"); +#endif + +char * +stpcpy(char *to, const char *from) +{ + for (; (*to = *from) != '\0'; ++from, ++to); + return(to); +} diff --git a/contrib/libs/libc_compat/strcasestr.c b/contrib/libs/libc_compat/strcasestr.c index f19eb28207..ee299b1c01 100644 --- a/contrib/libs/libc_compat/strcasestr.c +++ b/contrib/libs/libc_compat/strcasestr.c @@ -1,61 +1,61 @@ -/* $OpenBSD: strcasestr.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */ -/* $NetBSD: strcasestr.c,v 1.2 2005/02/09 21:35:47 kleink Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <ctype.h> -#include "string.h" - -/* - * Find the first occurrence of find in s, ignore case. - */ -char * -strcasestr(const char *s, const char *find) -{ - char c, sc; - size_t len; - - if ((c = *find++) != 0) { - c = (char)tolower((unsigned char)c); - len = strlen(find); - do { - do { - if ((sc = *s++) == 0) - return (NULL); - } while ((char)tolower((unsigned char)sc) != c); - } while (strncasecmp(s, find, len) != 0); - s--; - } - return ((char *)s); -} - +/* $OpenBSD: strcasestr.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */ +/* $NetBSD: strcasestr.c,v 1.2 2005/02/09 21:35:47 kleink Exp $ */ + +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <ctype.h> +#include "string.h" + +/* + * Find the first occurrence of find in s, ignore case. + */ +char * +strcasestr(const char *s, const char *find) +{ + char c, sc; + size_t len; + + if ((c = *find++) != 0) { + c = (char)tolower((unsigned char)c); + len = strlen(find); + do { + do { + if ((sc = *s++) == 0) + return (NULL); + } while ((char)tolower((unsigned char)sc) != c); + } while (strncasecmp(s, find, len) != 0); + s--; + } + return ((char *)s); +} + diff --git a/contrib/libs/libc_compat/string.c b/contrib/libs/libc_compat/string.c index 1a05e0cd8c..291f110361 100644 --- a/contrib/libs/libc_compat/string.c +++ b/contrib/libs/libc_compat/string.c @@ -1,16 +1,16 @@ -#include <ctype.h> -#include <string.h> - -char* strupr(char* s) { - char* d; - for (d = s; *d; ++d) - *d = (char)toupper((int)*d); - return s; -} - -char* strlwr(char* s) { - char* d; - for (d = s; *d; ++d) - *d = (char)tolower((int)*d); - return s; -} +#include <ctype.h> +#include <string.h> + +char* strupr(char* s) { + char* d; + for (d = s; *d; ++d) + *d = (char)toupper((int)*d); + return s; +} + +char* strlwr(char* s) { + char* d; + for (d = s; *d; ++d) + *d = (char)tolower((int)*d); + return s; +} diff --git a/contrib/libs/libc_compat/string.h b/contrib/libs/libc_compat/string.h index 52e3dc9ddf..ad74d9a630 100644 --- a/contrib/libs/libc_compat/string.h +++ b/contrib/libs/libc_compat/string.h @@ -1,44 +1,44 @@ #pragma once #include <stddef.h> -#include <ctype.h> -#include <string.h> +#include <ctype.h> +#include <string.h> #ifdef __cplusplus extern "C" { #endif -#if !defined(__FreeBSD__) && !defined(__APPLE__) +#if !defined(__FreeBSD__) && !defined(__APPLE__) size_t strlcpy(char* dst, const char* src, size_t len); size_t strlcat(char* dst, const char* src, size_t len); -#endif +#endif #if (!defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__)) || (defined(__ANDROID__) && __ANDROID_API__ < 21) -char* stpcpy(char* dst, const char* src); -#endif - -#if !defined(_MSC_VER) - -#define stricmp strcasecmp -#define strnicmp strncasecmp - -char* strlwr(char*); -char* strupr(char*); - -#else // _MSC_VER - -#define strcasecmp stricmp -#define strncasecmp strnicmp - -char* strcasestr(const char* s1, const char* s2); -char* strsep(char** stringp, const char* delim); - -#endif // _MSC_VER - -#if defined(_MSC_VER) || defined(__APPLE__) -void* memrchr(const void* s, int c, size_t n); -#endif - +char* stpcpy(char* dst, const char* src); +#endif + +#if !defined(_MSC_VER) + +#define stricmp strcasecmp +#define strnicmp strncasecmp + +char* strlwr(char*); +char* strupr(char*); + +#else // _MSC_VER + +#define strcasecmp stricmp +#define strncasecmp strnicmp + +char* strcasestr(const char* s1, const char* s2); +char* strsep(char** stringp, const char* delim); + +#endif // _MSC_VER + +#if defined(_MSC_VER) || defined(__APPLE__) +void* memrchr(const void* s, int c, size_t n); +#endif + #ifdef __cplusplus } //extern "C" #endif diff --git a/contrib/libs/libc_compat/strsep.c b/contrib/libs/libc_compat/strsep.c index e4d55e8e2f..ed605bce97 100644 --- a/contrib/libs/libc_compat/strsep.c +++ b/contrib/libs/libc_compat/strsep.c @@ -1,71 +1,71 @@ -/* $OpenBSD: strsep.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <string.h> - -/* - * Get next token from string *stringp, where tokens are possibly-empty - * strings separated by characters from delim. - * - * Writes NULs into the string at *stringp to end tokens. - * delim need not remain constant from call to call. - * On return, *stringp points past the last NUL written (if there might - * be further tokens), or is NULL (if there are definitely no more tokens). - * - * If *stringp is NULL, strsep returns NULL. - */ -char * -strsep(char **stringp, const char *delim) -{ - char *s; - const char *spanp; - int c, sc; - char *tok; - - if ((s = *stringp) == NULL) - return (NULL); - for (tok = s;;) { - c = *s++; - spanp = delim; - do { - if ((sc = *spanp++) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *stringp = s; - return (tok); - } - } while (sc != 0); - } - /* NOTREACHED */ -} - +/* $OpenBSD: strsep.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */ + +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <string.h> + +/* + * Get next token from string *stringp, where tokens are possibly-empty + * strings separated by characters from delim. + * + * Writes NULs into the string at *stringp to end tokens. + * delim need not remain constant from call to call. + * On return, *stringp points past the last NUL written (if there might + * be further tokens), or is NULL (if there are definitely no more tokens). + * + * If *stringp is NULL, strsep returns NULL. + */ +char * +strsep(char **stringp, const char *delim) +{ + char *s; + const char *spanp; + int c, sc; + char *tok; + + if ((s = *stringp) == NULL) + return (NULL); + for (tok = s;;) { + c = *s++; + spanp = delim; + do { + if ((sc = *spanp++) == c) { + if (c == 0) + s = NULL; + else + s[-1] = 0; + *stringp = s; + return (tok); + } + } while (sc != 0); + } + /* NOTREACHED */ +} + diff --git a/contrib/libs/libc_compat/update.sh b/contrib/libs/libc_compat/update.sh index a2ead61855..4cee160904 100755 --- a/contrib/libs/libc_compat/update.sh +++ b/contrib/libs/libc_compat/update.sh @@ -4,10 +4,10 @@ unweak() { sed --in-place --expression 's/DEF_WEAK(.\+);//g' "$1" } -get_string_method() { - curl "https://raw.githubusercontent.com/openbsd/src/master/lib/libc/string/$1" --output "$1" && unweak "$1" -} - +get_string_method() { + curl "https://raw.githubusercontent.com/openbsd/src/master/lib/libc/string/$1" --output "$1" && unweak "$1" +} + fix_tabs() { sed --in-place --expression 's/\t/ /g' "$1" } @@ -17,14 +17,14 @@ fix_decls() { sed --in-place --expression 's/__END_DECLS/#ifdef __cplusplus\n} \/\/ extern "C"\n#endif/g' "$1" } -get_string_method "strlcpy.c" -get_string_method "strlcat.c" -get_string_method "strsep.c" -# strcasestr uses strncasecmp, which is platform dependent, so include local string.h -get_string_method "strcasestr.c" && sed --in-place 's/#include <string.h>/#include "string.h"/g' "strcasestr.c" -get_string_method "memrchr.c" -get_string_method "stpcpy.c" - +get_string_method "strlcpy.c" +get_string_method "strlcat.c" +get_string_method "strsep.c" +# strcasestr uses strncasecmp, which is platform dependent, so include local string.h +get_string_method "strcasestr.c" && sed --in-place 's/#include <string.h>/#include "string.h"/g' "strcasestr.c" +get_string_method "memrchr.c" +get_string_method "stpcpy.c" + mkdir -p include/windows/sys curl "https://raw.githubusercontent.com/openbsd/src/master/sys/sys/queue.h" --output "include/windows/sys/queue.h" diff --git a/contrib/libs/libc_compat/ya.make b/contrib/libs/libc_compat/ya.make index 602f77a458..b92184c165 100644 --- a/contrib/libs/libc_compat/ya.make +++ b/contrib/libs/libc_compat/ya.make @@ -31,7 +31,7 @@ IF (OS_ANDROID) SRCS( strlcat.c strlcpy.c - ) + ) IF (ANDROID_API < 28) SRCS( glob.c @@ -53,12 +53,12 @@ IF (OS_ANDROID) ENDIF() ENDIF() -IF (OS_WINDOWS OR OS_DARWIN OR OS_IOS) - SRCS( +IF (OS_WINDOWS OR OS_DARWIN OR OS_IOS) + SRCS( memrchr.c - ) -ENDIF() - + ) +ENDIF() + IF (OS_DARWIN) SRCS( reallocarray.c @@ -69,15 +69,15 @@ IF (OS_WINDOWS) ADDINCL( GLOBAL contrib/libs/libc_compat/include/windows ) - SRCS( + SRCS( reallocarray.c stpcpy.c strlcat.c strlcpy.c - strcasestr.c - strsep.c - src/windows/sys/uio.c - ) + strcasestr.c + strsep.c + src/windows/sys/uio.c + ) ENDIF() IF (OS_LINUX) diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h index 9bc0d3a77c..cb9205a63a 100644 --- a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h +++ b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h @@ -655,7 +655,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template<typename TypeHandler> void Truncate(int new_size) { GOOGLE_DCHECK_LE(new_size, current_size_); - for (int i = new_size; i < current_size_; i++) { + for (int i = new_size; i < current_size_; i++) { TypeHandler::Clear(cast<TypeHandler>(rep_->elements[i])); } current_size_ = new_size; |