X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libmudflap%2Fmf-runtime.h;h=4c512d5a690f409d0c056178bbbd599d9ff8c4f2;hp=b008883c43f0c4eadc28e78f356401a77ee2a75e;hb=ef4f26e54914a90c2cf2ec95afba9fa7238eb58b;hpb=33296cfaf4f673fa5ca21a051673fa3532966a74 diff --git a/libmudflap/mf-runtime.h b/libmudflap/mf-runtime.h index b008883c43f..4c512d5a690 100644 --- a/libmudflap/mf-runtime.h +++ b/libmudflap/mf-runtime.h @@ -1,3 +1,30 @@ +/* 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 + and Graydon Hoare + +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 +. */ + /* Public libmudflap declarations -*- C -*- */ #ifndef MF_RUNTIME_H @@ -23,9 +50,13 @@ extern unsigned char __mf_lc_shift; /* 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 */ @@ -51,7 +82,7 @@ extern "C" { 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)); @@ -65,33 +96,33 @@ extern int __mf_set_options (const char *opts); 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