Lely core libraries  2.2.5
strings.h
Go to the documentation of this file.
1 
22 #ifndef LELY_LIBC_STRINGS_H_
23 #define LELY_LIBC_STRINGS_H_
24 
25 #include <lely/features.h>
26 
27 #ifndef LELY_HAVE_STRINGS_H
28 #if (_POSIX_C_SOURCE >= 200112L || defined(__NEWLIB__))
29 #define LELY_HAVE_STRINGS_H 1
30 #endif
31 #endif
32 
33 #if LELY_HAVE_STRINGS_H
34 #include <strings.h>
35 #else // !LELY_HAVE_STRINGS_H
36 
37 #include <stddef.h>
38 
39 #ifndef LELY_LIBC_STRINGS_INLINE
40 #define LELY_LIBC_STRINGS_INLINE static inline
41 #endif
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
53 #if (defined(__GNUC__) || __has_builtin(__builtin_ffs)) \
54  && !defined(__BSD_VISIBLE)
55 LELY_LIBC_STRINGS_INLINE int ffs(int i);
56 
57 inline int
58 ffs(int i)
59 {
60  return __builtin_ffs(i);
61 }
62 #else
63 int ffs(int i);
64 #endif
65 
73 int strcasecmp(const char *s1, const char *s2);
74 
82 int strncasecmp(const char *s1, const char *s2, size_t n);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif // !LELY_HAVE_STRINGS_H
89 
90 #endif // !LELY_LIBC_STRINGS_H_
This header file is part of the Lely libraries; it contains the compiler feature definitions.
This header file is part of the C11 and POSIX compatibility library; it includes <stddef....
This header file is part of the C11 and POSIX compatibility library; it includes <strings....