modernc.org/cc@v1.0.1/v2/headers/linux_arm/usr/include/strings.h (about)

     1  /* Copyright (C) 1991-2016 Free Software Foundation, Inc.
     2     This file is part of the GNU C Library.
     3  
     4     The GNU C Library is free software; you can redistribute it and/or
     5     modify it under the terms of the GNU Lesser General Public
     6     License as published by the Free Software Foundation; either
     7     version 2.1 of the License, or (at your option) any later version.
     8  
     9     The GNU C Library is distributed in the hope that it will be useful,
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12     Lesser General Public License for more details.
    13  
    14     You should have received a copy of the GNU Lesser General Public
    15     License along with the GNU C Library; if not, see
    16     <http://www.gnu.org/licenses/>.  */
    17  
    18  #ifndef	_STRINGS_H
    19  #define	_STRINGS_H	1
    20  
    21  /* We don't need and should not read this file if <string.h> was already
    22     read. The one exception being that if __USE_MISC isn't defined, then
    23     these aren't defined in string.h, so we need to define them here.  */
    24  #if !defined _STRING_H || !defined __USE_MISC
    25  
    26  #include <features.h>
    27  #define __need_size_t
    28  #include <stddef.h>
    29  
    30  /* Tell the caller that we provide correct C++ prototypes.  */
    31  #if defined __cplusplus && __GNUC_PREREQ (4, 4)
    32  #define __CORRECT_ISO_CPP_STRINGS_H_PROTO
    33  #endif
    34  
    35  __BEGIN_DECLS
    36  #if defined __USE_MISC || !defined __USE_XOPEN2K8
    37  /* Compare N bytes of S1 and S2 (same as memcmp).  */
    38  extern int bcmp(const void *__s1, const void *__s2, size_t __n)
    39  __THROW __attribute_pure__;
    40  
    41  /* Copy N bytes of SRC to DEST (like memmove, but args reversed).  */
    42  extern void bcopy(const void *__src, void *__dest, size_t __n) __THROW;
    43  
    44  /* Set N bytes of S to 0.  */
    45  extern void bzero(void *__s, size_t __n) __THROW;
    46  
    47  /* Find the first occurrence of C in S (same as strchr).  */
    48  #ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
    49  extern "C++" {
    50  	extern char *index(char *__s, int __c)
    51  	__THROW __asm("index") __attribute_pure__ __nonnull((1));
    52  	extern const char *index(const char *__s, int __c)
    53  	__THROW __asm("index") __attribute_pure__ __nonnull((1));
    54  
    55  #if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
    56  	__extern_always_inline char *index(char *__s, int __c) __THROW
    57  {
    58  	return __builtin_index(__s, __c);
    59  }
    60  	__extern_always_inline const char *index(const char *__s, int __c) __THROW {
    61  		return __builtin_index(__s, __c);
    62  	}
    63  #endif
    64  }
    65  #else
    66  extern char *index(const char *__s, int __c)
    67  __THROW __attribute_pure__ __nonnull((1));
    68  #endif
    69  
    70  /* Find the last occurrence of C in S (same as strrchr).  */
    71  #ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
    72  extern "C++" {
    73  	extern char *rindex(char *__s, int __c)
    74  	__THROW __asm("rindex") __attribute_pure__ __nonnull((1));
    75  	extern const char *rindex(const char *__s, int __c)
    76  	__THROW __asm("rindex") __attribute_pure__ __nonnull((1));
    77  
    78  #if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
    79  	__extern_always_inline char *rindex(char *__s, int __c) __THROW
    80  {
    81  	return __builtin_rindex(__s, __c);
    82  }
    83  	__extern_always_inline const char *rindex(const char *__s, int __c) __THROW {
    84  		return __builtin_rindex(__s, __c);
    85  	}
    86  #endif
    87  }
    88  #else
    89  extern char *rindex(const char *__s, int __c)
    90  __THROW __attribute_pure__ __nonnull((1));
    91  #endif
    92  #endif
    93  
    94  #if defined __USE_MISC || !defined __USE_XOPEN2K8 || defined __USE_XOPEN2K8XSI
    95  /* Return the position of the first bit set in I, or 0 if none are set.
    96     The least-significant bit is position 1, the most-significant 32.  */
    97  extern int ffs(int __i)
    98  __THROW __attribute__ ((const));
    99  #endif
   100  
   101  /* Compare S1 and S2, ignoring case.  */
   102  extern int strcasecmp(const char *__s1, const char *__s2)
   103  __THROW __attribute_pure__;
   104  
   105  /* Compare no more than N chars of S1 and S2, ignoring case.  */
   106  extern int strncasecmp(const char *__s1, const char *__s2, size_t __n)
   107  __THROW __attribute_pure__;
   108  
   109  #ifdef	__USE_XOPEN2K8
   110  /* The following functions are equivalent to the both above but they
   111     take the locale they use for the collation as an extra argument.
   112     This is not standardsized but something like will come.  */
   113  #include <xlocale.h>
   114  
   115  /* Again versions of a few functions which use the given locale instead
   116     of the global one.  */
   117  extern int strcasecmp_l(const char *__s1, const char *__s2, __locale_t __loc)
   118  __THROW __attribute_pure__ __nonnull((1, 2, 3));
   119  
   120  extern int strncasecmp_l(const char *__s1, const char *__s2, size_t __n, __locale_t __loc)
   121  __THROW __attribute_pure__ __nonnull((1, 2, 4));
   122  #endif
   123  
   124  __END_DECLS
   125  #endif				/* string.h  */
   126  #endif				/* strings.h  */