+/* Implementation header for mudflap runtime library.
+ Mudflap: narrow-pointer bounds-checking by tree rewriting.
+ Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+ Contributed by Frank Ch. Eigler <fche@redhat.com>
+ and Graydon Hoare <graydon@redhat.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
/* Public libmudflap declarations -*- C -*- */
#ifndef MF_RUNTIME_H
/* Multithreading support. */
#ifdef _MUDFLAPTH
/* extern pthread_mutex_t __mf_biglock; */
+#ifndef _REENTRANT
#define _REENTRANT
+#endif
+#ifndef _THREAD_SAFE
#define _THREAD_SAFE
#endif
+#endif
/* Codes to describe the type of access to check: __mf_check arg 3 */
extern void __mf_check (void *ptr, __mf_size_t sz, int type, const char *location)
__attribute((nothrow));
-extern void __mf_register (void *ptr, __mf_size_t sz, int type, const char *name)
+extern void __mf_register (void *ptr, __mf_size_t sz, int type, const char *name)
__attribute((nothrow));
extern void __mf_unregister (void *ptr, __mf_size_t sz, int type)
__attribute((nothrow));
done by simple #define rather than linker wrapping, since only
instrumented modules are meant to be affected. */
-#ifdef _MUDFLAP
-#pragma redefine_extname memcpy __mfwrap_memcpy
+#ifdef _MUDFLAP
+#pragma redefine_extname memcpy __mfwrap_memcpy
#pragma redefine_extname memmove __mfwrap_memmove
-#pragma redefine_extname memset __mfwrap_memset
-#pragma redefine_extname memcmp __mfwrap_memcmp
-#pragma redefine_extname memchr __mfwrap_memchr
+#pragma redefine_extname memset __mfwrap_memset
+#pragma redefine_extname memcmp __mfwrap_memcmp
+#pragma redefine_extname memchr __mfwrap_memchr
#pragma redefine_extname memrchr __mfwrap_memrchr
-#pragma redefine_extname strcpy __mfwrap_strcpy
-#pragma redefine_extname strncpy __mfwrap_strncpy
-#pragma redefine_extname strcat __mfwrap_strcat
+#pragma redefine_extname strcpy __mfwrap_strcpy
+#pragma redefine_extname strncpy __mfwrap_strncpy
+#pragma redefine_extname strcat __mfwrap_strcat
#pragma redefine_extname strncat __mfwrap_strncat
-#pragma redefine_extname strcmp __mfwrap_strcmp
-#pragma redefine_extname strcasecmp __mfwrap_strcasecmp
-#pragma redefine_extname strncmp __mfwrap_strncmp
+#pragma redefine_extname strcmp __mfwrap_strcmp
+#pragma redefine_extname strcasecmp __mfwrap_strcasecmp
+#pragma redefine_extname strncmp __mfwrap_strncmp
#pragma redefine_extname strncasecmp __mfwrap_strncasecmp
-#pragma redefine_extname strdup __mfwrap_strdup
-#pragma redefine_extname strndup __mfwrap_strndup
-#pragma redefine_extname strchr __mfwrap_strchr
+#pragma redefine_extname strdup __mfwrap_strdup
+#pragma redefine_extname strndup __mfwrap_strndup
+#pragma redefine_extname strchr __mfwrap_strchr
#pragma redefine_extname strrchr __mfwrap_strrchr
-#pragma redefine_extname strstr __mfwrap_strstr
-#pragma redefine_extname memmem __mfwrap_memmem
-#pragma redefine_extname strlen __mfwrap_strlen
+#pragma redefine_extname strstr __mfwrap_strstr
+#pragma redefine_extname memmem __mfwrap_memmem
+#pragma redefine_extname strlen __mfwrap_strlen
#pragma redefine_extname strnlen __mfwrap_strnlen
-#pragma redefine_extname bzero __mfwrap_bzero
-#pragma redefine_extname bcopy __mfwrap_bcopy
-#pragma redefine_extname bcmp __mfwrap_bcmp
-#pragma redefine_extname index __mfwrap_index
+#pragma redefine_extname bzero __mfwrap_bzero
+#pragma redefine_extname bcopy __mfwrap_bcopy
+#pragma redefine_extname bcmp __mfwrap_bcmp
+#pragma redefine_extname index __mfwrap_index
#pragma redefine_extname rindex __mfwrap_rindex
#pragma redefine_extname asctime __mfwrap_asctime
#pragma redefine_extname ctime __mfwrap_ctime