]>
git.proxmox.com Git - ovs.git/blob - lib/string.h.in
2 * Copyright (c) 2009, 2011, 2013 Nicira, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef STRING_WRAPPER_H
18 #define STRING_WRAPPER_H 1
20 #@INCLUDE_NEXT@ @NEXT_STRING_H@
22 /* Glibc 2.7 has a bug in strtok_r when compiling with optimization that can
23 * cause segfaults if the delimiters argument is a compile-time constant that
24 * has exactly 1 character:
26 * http://sources.redhat.com/bugzilla/show_bug.cgi?id=5614
28 * The bug is only present in the inline version of strtok_r(), so force the
29 * out-of-line version to be used instead. */
35 #define strtok_r strtok_s
36 #define strcasecmp _stricmp
37 #define strncasecmp _strnicmp
38 #define strerror_r(errnum, buf, buflen) strerror_s(buf, buflen, errnum)
43 #define strnlen rpl_strnlen
44 size_t strnlen(const char *, size_t maxlen
);
47 #endif /* string.h wrapper */