about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-09-11 16:02:17 -0700
committerMike Frysinger <vapier@gentoo.org>2015-02-16 05:19:15 -0500
commitb0694b9e98ee64cb25490de0921ce307f3872749 (patch)
tree5fe07b4da5c6f4cc7b34c864a0aa455b2facf076 /locale
parentf80af76648ed97a76745fad6caa3315a79cb1c7c (diff)
downloadglibc-b0694b9e98ee64cb25490de0921ce307f3872749.tar.gz
glibc-b0694b9e98ee64cb25490de0921ce307f3872749.tar.xz
glibc-b0694b9e98ee64cb25490de0921ce307f3872749.zip
Move findidx nested functions to top-level.
Needed in order to backport strxfrm_l security fix cleanly.

(cherry picked from commit 8c0ab919f63dc03a420751172602a52d2bea59a8)

Conflicts:
	ChangeLog
Diffstat (limited to 'locale')
-rw-r--r--locale/weight.h13
-rw-r--r--locale/weightwc.h13
2 files changed, 20 insertions, 6 deletions
diff --git a/locale/weight.h b/locale/weight.h
index 9eb8ac666a..9d93fdc5c4 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -16,10 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _WEIGHT_H_
+#define _WEIGHT_H_	1
+
 /* Find index of weight.  */
-auto inline int32_t
-__attribute ((always_inline))
-findidx (const unsigned char **cpp, size_t len)
+static inline int32_t __attribute__ ((always_inline))
+findidx (const int32_t *table,
+	 const int32_t *indirect,
+	 const unsigned char *extra,
+	 const unsigned char **cpp, size_t len)
 {
   int_fast32_t i = table[*(*cpp)++];
   const unsigned char *cp;
@@ -130,3 +135,5 @@ findidx (const unsigned char **cpp, size_t len)
   /* NOTREACHED */
   return 0x43219876;
 }
+
+#endif	/* weight.h */
diff --git a/locale/weightwc.h b/locale/weightwc.h
index 8f047e3ba7..0f70b00658 100644
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -16,10 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _WEIGHTWC_H_
+#define _WEIGHTWC_H_	1
+
 /* Find index of weight.  */
-auto inline int32_t
-__attribute ((always_inline))
-findidx (const wint_t **cpp, size_t len)
+static inline int32_t __attribute__ ((always_inline))
+findidx (const int32_t *table,
+	 const int32_t *indirect,
+	 const wint_t *extra,
+	 const wint_t **cpp, size_t len)
 {
   wint_t ch = *(*cpp)++;
   int32_t i = __collidx_table_lookup ((const char *) table, ch);
@@ -109,3 +114,5 @@ findidx (const wint_t **cpp, size_t len)
   /* NOTREACHED */
   return 0x43219876;
 }
+
+#endif	/* weightwc.h */