Merge from vendor branch GCC:
[dragonfly.git] / contrib / gcc / protector.h
1 /* RTL buffer overflow protection function for GNU C compiler
2    Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21
22 /* declaration of GUARD variable */
23 #define GUARD_m         Pmode
24 #define UNITS_PER_GUARD MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
25
26 #ifndef L_stack_smash_handler
27
28 /* insert a guard variable before a character buffer and change the order
29  of pointer variables, character buffers and pointer arguments */
30
31 extern void prepare_stack_protection  PARAMS ((int inlinable));
32
33 #ifdef TREE_CODE
34 /* search a character array from the specified type tree */
35
36 extern int search_string_def PARAMS ((tree names));
37 #endif
38
39 /* examine whether the input contains frame pointer addressing */
40
41 extern int contains_fp PARAMS ((rtx op));
42
43 /* allocate a local variable in the stack area before character buffers
44    to avoid the corruption of it */
45
46 extern rtx assign_stack_local_for_pseudo_reg PARAMS ((enum machine_mode, HOST_WIDE_INT, int));
47
48 #endif