summaryrefslogtreecommitdiff
path: root/libmudflap/mf-runtime.c
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 19:04:56 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 19:04:56 +0000
commite46563d95c39e4e437ec5f5bd752983f220ef3d1 (patch)
tree45d762f48cc30af98123706913cfa76316d87f76 /libmudflap/mf-runtime.c
parent4a6a3ec71ff798a4de0e0ce9c14795bb65f8389e (diff)
downloadgcc-e46563d95c39e4e437ec5f5bd752983f220ef3d1.tar.gz
2004-06-09 Frank Ch. Eigler <fche@redhat.com>
ctype support. * configure.in: Look for ctype header and glibc implementation. * mf-hooks2.c (__ctype_{b,toupper,tolower}_loc): Sample ctype array hooks for glibc 2.3. * mf-runtime.h.in: Wrap them. * mf-runtime.c (__mf_init): Leave marker regarding other ctype implementations. * testsuite/libmudflap.c/pass47-frag.c: New test. * configure, config.h.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/mf-runtime.c')
-rw-r--r--libmudflap/mf-runtime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c
index ca42ab7ebbd..19e9fe28cc2 100644
--- a/libmudflap/mf-runtime.c
+++ b/libmudflap/mf-runtime.c
@@ -63,6 +63,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
+#include <ctype.h>
#include "mf-runtime.h"
#include "mf-impl.h"
@@ -685,6 +686,11 @@ __wrap_main (int argc, char* argv[])
__mf_register (stdin, sizeof (*stdin), __MF_TYPE_STATIC, "stdin");
__mf_register (stdout, sizeof (*stdout), __MF_TYPE_STATIC, "stdout");
__mf_register (stderr, sizeof (*stderr), __MF_TYPE_STATIC, "stderr");
+
+ /* Make some effort to register ctype.h static arrays. */
+ /* XXX: e.g., on Solaris, may need to register __ctype, _ctype, __ctype_mask, __toupper, etc. */
+ /* On modern Linux GLIBC, these are thread-specific and changeable, and are dealt
+ with in mf-hooks2.c. */
}
#ifdef PIC