Browse Source

Macros are no good for jump relocs, hack to get rid of one introduced my new regex code

Peter S. Mazinger 18 years ago
parent
commit
255fb838c8
2 changed files with 5 additions and 1 deletions
  1. 3 0
      libc/misc/regex/regcomp.c
  2. 2 1
      libc/stdlib/stdlib.c

+ 3 - 0
libc/misc/regex/regcomp.c

@@ -834,6 +834,9 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
   dfa->state_hash_mask = table_size - 1;
 
 #ifdef __UCLIBC_HAS_WCHAR__
+# undef MB_CUR_MAX
+# define	MB_CUR_MAX	(_stdlib_mb_cur_max_internal ())
+extern size_t _stdlib_mb_cur_max_internal (void) __THROW __wur attribute_hidden;
   dfa->mb_cur_max = MB_CUR_MAX;
 #else
   dfa->mb_cur_max = 1;

+ 2 - 1
libc/stdlib/stdlib.c

@@ -868,7 +868,7 @@ void ssort (void  *base,
 /**********************************************************************/
 #ifdef L__stdlib_mb_cur_max
 
-size_t _stdlib_mb_cur_max(void)
+size_t attribute_hidden _stdlib_mb_cur_max_internal(void)
 {
 #ifdef __CTYPE_HAS_UTF_8_LOCALES
 	return __UCLIBC_CURLOCALE_DATA.mb_cur_max;
@@ -881,6 +881,7 @@ size_t _stdlib_mb_cur_max(void)
 	return 1;
 #endif
 }
+strong_alias(_stdlib_mb_cur_max_internal,_stdlib_mb_cur_max)
 
 #endif
 /**********************************************************************/