diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-02-12 14:48:39 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-02-12 14:48:39 +0000 |
commit | 33e0b9b98c537e2bb9e0d9c86a9f715b4b15e931 (patch) | |
tree | ae145ed7ae4b0c95a2b181ebf5c216d6c10d041c | |
parent | 661db82ac6e081376f891025aaf54e464aba7576 (diff) | |
download | gnutls-33e0b9b98c537e2bb9e0d9c86a9f715b4b15e931.tar.gz |
Update.
-rw-r--r-- | gl/gnulib.mk | 1 | ||||
-rw-r--r-- | gl/m4/string_h.m4 | 1 | ||||
-rw-r--r-- | gl/string_.h | 6 | ||||
-rw-r--r-- | lgl/Makefile.am | 1 | ||||
-rw-r--r-- | lgl/m4/string_h.m4 | 1 | ||||
-rw-r--r-- | lgl/string_.h | 6 |
6 files changed, 16 insertions, 0 deletions
diff --git a/gl/gnulib.mk b/gl/gnulib.mk index 2ea95af379..98d1a9f388 100644 --- a/gl/gnulib.mk +++ b/gl/gnulib.mk @@ -164,6 +164,7 @@ string.h: string_.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 index 80e95e1bb2..9f5ba8752c 100644 --- a/gl/m4/string_h.m4 +++ b/gl/m4/string_h.m4 @@ -67,6 +67,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR_DEFAULTS], GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) + GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) diff --git a/gl/string_.h b/gl/string_.h index 113bfb4806..1ac0ea7df5 100644 --- a/gl/string_.h +++ b/gl/string_.h @@ -349,6 +349,12 @@ extern char *strtok_r (char *restrict s, char const *restrict delim, /* The following functions are not specified by POSIX. They are gnulib extensions. */ +#if @GNULIB_MBSLEN@ +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +extern size_t mbslen (const char *string); +#endif + #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. diff --git a/lgl/Makefile.am b/lgl/Makefile.am index 7ad392bb38..12eac7eaa3 100644 --- a/lgl/Makefile.am +++ b/lgl/Makefile.am @@ -281,6 +281,7 @@ string.h: string_.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ diff --git a/lgl/m4/string_h.m4 b/lgl/m4/string_h.m4 index 80e95e1bb2..9f5ba8752c 100644 --- a/lgl/m4/string_h.m4 +++ b/lgl/m4/string_h.m4 @@ -67,6 +67,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR_DEFAULTS], GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) + GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) diff --git a/lgl/string_.h b/lgl/string_.h index f3cd465b0d..233a2bfea1 100644 --- a/lgl/string_.h +++ b/lgl/string_.h @@ -349,6 +349,12 @@ extern char *strtok_r (char *restrict s, char const *restrict delim, /* The following functions are not specified by POSIX. They are gnulib extensions. */ +#if @GNULIB_MBSLEN@ +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +extern size_t mbslen (const char *string); +#endif + #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. |