~p-ch-e/gnuhello/gnuhello

« back to all changes in this revision

Viewing changes to gnulib/lib/string.in.h

  • Committer: Reuben Thomas
  • Date: 2011-12-17 11:23:38 UTC
  • Revision ID: rrt@sc3d.org-20111217112338-kurwdy8nu69g3t6f
Update gnulib and convert .cvsignore to .bzrignore.

        * gnulib: Update.
        * .bzrignore: Add.
        * .cvsignore: Remove.
        * contrib/.cvsignore: Likewise.
        * doc/.cvsignore: Likewise.
        * man/.cvsignore: Likewise.
        * po/.cvsignore: Likewise.
        * src/.cvsignore: Likewise.
        * tests/.cvsignore: Likewise.
        * build/mkinstalldirs: Remove: no longer needed.
        * po: Update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
   along with this program; if not, write to the Free Software Foundation,
17
17
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
18
18
 
19
 
#ifndef _GL_STRING_H
 
19
#ifndef _@GUARD_PREFIX@_STRING_H
20
20
 
21
21
#if __GNUC__ >= 3
22
22
@PRAGMA_SYSTEM_HEADER@
26
26
/* The include_next requires a split double-inclusion guard.  */
27
27
#@INCLUDE_NEXT@ @NEXT_STRING_H@
28
28
 
29
 
#ifndef _GL_STRING_H
30
 
#define _GL_STRING_H
 
29
#ifndef _@GUARD_PREFIX@_STRING_H
 
30
#define _@GUARD_PREFIX@_STRING_H
31
31
 
32
32
/* NetBSD 5.0 mis-defines NULL.  */
33
33
#include <stddef.h>
59
59
/* The definition of _GL_WARN_ON_USE is copied here.  */
60
60
 
61
61
 
 
62
/* Find the index of the least-significant set bit.  */
 
63
#if @GNULIB_FFSL@
 
64
# if !@HAVE_FFSL@
 
65
_GL_FUNCDECL_SYS (ffsl, int, (long int i));
 
66
# endif
 
67
_GL_CXXALIAS_SYS (ffsl, int, (long int i));
 
68
_GL_CXXALIASWARN (ffsl);
 
69
#elif defined GNULIB_POSIXCHECK
 
70
# undef ffsl
 
71
# if HAVE_RAW_DECL_FFSL
 
72
_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
 
73
# endif
 
74
#endif
 
75
 
 
76
 
 
77
/* Find the index of the least-significant set bit.  */
 
78
#if @GNULIB_FFSLL@
 
79
# if !@HAVE_FFSLL@
 
80
_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
 
81
# endif
 
82
_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
 
83
_GL_CXXALIASWARN (ffsll);
 
84
#elif defined GNULIB_POSIXCHECK
 
85
# undef ffsll
 
86
# if HAVE_RAW_DECL_FFSLL
 
87
_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
 
88
# endif
 
89
#endif
 
90
 
 
91
 
62
92
/* Return the first instance of C within N bytes of S, or NULL.  */
63
93
#if @GNULIB_MEMCHR@
64
94
# if @REPLACE_MEMCHR@
277
307
 
278
308
/* Find the first occurrence of C in S or the final NUL byte.  */
279
309
#if @GNULIB_STRCHRNUL@
280
 
# if ! @HAVE_STRCHRNUL@
 
310
# if @REPLACE_STRCHRNUL@
 
311
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
312
#   define strchrnul rpl_strchrnul
 
313
#  endif
 
314
_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
 
315
                                     _GL_ATTRIBUTE_PURE
 
316
                                     _GL_ARG_NONNULL ((1)));
 
317
_GL_CXXALIAS_RPL (strchrnul, char *,
 
318
                  (const char *str, int ch));
 
319
# else
 
320
#  if ! @HAVE_STRCHRNUL@
281
321
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
282
322
                                     _GL_ATTRIBUTE_PURE
283
323
                                     _GL_ARG_NONNULL ((1)));
284
 
# endif
 
324
#  endif
285
325
  /* On some systems, this function is defined as an overloaded function:
286
326
       extern "C++" { const char * std::strchrnul (const char *, int); }
287
327
       extern "C++" { char * std::strchrnul (char *, int); }  */
288
328
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
289
329
                        char *, (char const *__s, int __c_in),
290
330
                        char const *, (char const *__s, int __c_in));
 
331
# endif
291
332
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
292
333
     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
293
334
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
725
766
   and return a pointer to it.  Return NULL if C is not found in STRING.
726
767
   Unlike strrchr(), this function works correctly in multibyte locales with
727
768
   encodings such as GB18030.  */
728
 
# if defined __hpux
 
769
# if defined __hpux || defined __INTERIX
729
770
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
730
 
#   define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
 
771
#   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
731
772
#  endif
732
773
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
733
774
                                   _GL_ARG_NONNULL ((1)));
966
1007
#endif
967
1008
 
968
1009
 
969
 
#endif /* _GL_STRING_H */
970
 
#endif /* _GL_STRING_H */
 
1010
#endif /* _@GUARD_PREFIX@_STRING_H */
 
1011
#endif /* _@GUARD_PREFIX@_STRING_H */