X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstring.in.h;h=d8b753dc5ae2662fde87c9a4508475b1137f9c1f;hb=d4d84c1d916f5bff3bb72be92e9d1383a25077c1;hp=f120a1b094e1f59e8e58cf2ed8f878f1bdfa3c01;hpb=d8fb6162b94aa556e0e150cc27d797d688a9e767;p=gnulib.git diff --git a/lib/string.in.h b/lib/string.in.h index f120a1b09..d8b753dc5 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_STRING_H +#ifndef _@GUARD_PREFIX@_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -26,8 +26,8 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ -#ifndef _GL_STRING_H -#define _GL_STRING_H +#ifndef _@GUARD_PREFIX@_STRING_H +#define _@GUARD_PREFIX@_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include @@ -59,6 +59,36 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Find the index of the least-significant set bit. */ +#if @GNULIB_FFSL@ +# if !@HAVE_FFSL@ +_GL_FUNCDECL_SYS (ffsl, int, (long int i)); +# endif +_GL_CXXALIAS_SYS (ffsl, int, (long int i)); +_GL_CXXALIASWARN (ffsl); +#elif defined GNULIB_POSIXCHECK +# undef ffsl +# if HAVE_RAW_DECL_FFSL +_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); +# endif +#endif + + +/* Find the index of the least-significant set bit. */ +#if @GNULIB_FFSLL@ +# if !@HAVE_FFSLL@ +_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +_GL_CXXALIASWARN (ffsll); +#elif defined GNULIB_POSIXCHECK +# undef ffsll +# if HAVE_RAW_DECL_FFSLL +_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); +# endif +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ @@ -736,9 +766,9 @@ _GL_CXXALIASWARN (mbschr); and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ -# if defined __hpux +# if defined __hpux || defined __INTERIX # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ +# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ # endif _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); @@ -977,5 +1007,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " #endif -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */