#include "pub_tool_redir.h"
#include "pub_tool_tooliface.h"
#include "valgrind.h"
-#include "config.h"
#include "mc_include.h"
#include "memcheck.h"
-#include <ctype.h>
-
/* ---------------------------------------------------------------------
We have our own versions of these functions for two reasons:
(a) it allows us to do overlap checking
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
( const char* s1, const char* s2 ) \
{ \
+ extern int tolower(int); \
register unsigned char c1; \
register unsigned char c2; \
while (True) { \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
( const char* s1, const char* s2, SizeT nmax ) \
{ \
+ extern int tolower(int); \
SizeT n = 0; \
while (True) { \
if (n >= nmax) return 0; \
#endif
-#ifdef HAVE_TOLOWER_L
-
-
#define STRCASECMP_L(soname, fnname) \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
- ( const char* s1, const char* s2, locale_t locale ); \
+ ( const char* s1, const char* s2, void* locale ); \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
- ( const char* s1, const char* s2, locale_t locale ) \
+ ( const char* s1, const char* s2, void* locale ) \
{ \
+ extern int tolower_l(int, void*) __attribute__((weak)); \
register unsigned char c1; \
register unsigned char c2; \
while (True) { \
#define STRNCASECMP_L(soname, fnname) \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
- ( const char* s1, const char* s2, SizeT nmax, locale_t locale ); \
+ ( const char* s1, const char* s2, SizeT nmax, void* locale ); \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
- ( const char* s1, const char* s2, SizeT nmax, locale_t locale ) \
+ ( const char* s1, const char* s2, SizeT nmax, void* locale ) \
{ \
+ extern int tolower_l(int, void*) __attribute__((weak)); \
SizeT n = 0; \
while (True) { \
if (n >= nmax) return 0; \
#endif
-#endif
-
-
#define STRCMP(soname, fnname) \
int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
( const char* s1, const char* s2 ); \