summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2003-05-08 09:37:45 +0000
committerBob Beck <beck@cvs.openbsd.org>2003-05-08 09:37:45 +0000
commit3adeb8c3924d25d0470010bbd9c39ce91db03bb4 (patch)
tree793443c82bbf8a8d85135fc80a33b8d595c20cd9 /gnu
parenta69cb28678e255d5f543babde54d09c299ab8aec (diff)
Don't inline strcpy. since it's evil anyway. This makes it
easier to find in object files without worrying about whether or not -fno-builtin was used in building. ok itojun@, tedu@, anil@, henning@, etc...
Diffstat (limited to 'gnu')
-rw-r--r--gnu/egcs/gcc/c-decl.c6
-rw-r--r--gnu/egcs/gcc/config/openbsd.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/c-decl.c b/gnu/egcs/gcc/c-decl.c
index a232217bc0a..f6e4f8df320 100644
--- a/gnu/egcs/gcc/c-decl.c
+++ b/gnu/egcs/gcc/c-decl.c
@@ -1,5 +1,6 @@
/* Process declarations and variables for C compiler.
- Copyright (C) 1988, 92-98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1951,6 +1952,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
{
/* Since the type is OLDDECL's, make OLDDECL's size go with. */
DECL_SIZE (newdecl) = DECL_SIZE (olddecl);
+ DECL_MODE (newdecl) = DECL_MODE (olddecl);
if (TREE_CODE (olddecl) != FUNCTION_DECL)
if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl))
DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
@@ -3543,8 +3545,10 @@ init_decl_processing ()
builtin_function ("memset", memset_ftype, BUILT_IN_MEMSET, NULL_PTR);
builtin_function ("strcmp", int_ftype_string_string, BUILT_IN_STRCMP,
NULL_PTR);
+#ifndef NO_UNSAFE_BUILTINS
builtin_function ("strcpy", string_ftype_ptr_ptr, BUILT_IN_STRCPY,
NULL_PTR);
+#endif
builtin_function ("strlen", strlen_ftype, BUILT_IN_STRLEN, NULL_PTR);
builtin_function ("sqrtf", float_ftype_float, BUILT_IN_FSQRT, NULL_PTR);
builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, NULL_PTR);
diff --git a/gnu/egcs/gcc/config/openbsd.h b/gnu/egcs/gcc/config/openbsd.h
index 81157d41821..3b9b3169ad2 100644
--- a/gnu/egcs/gcc/config/openbsd.h
+++ b/gnu/egcs/gcc/config/openbsd.h
@@ -308,3 +308,7 @@ do { \
as this depends on a few other details as well... */
#define HANDLE_SYSV_PRAGMA
+/* Disable the use of unsafe builtin functions, (strcpy), making
+ * them easier to spot in the object files.
+ */
+#define NO_UNSAFE_BUILTINS