Include ProPolice suport for GCC 3.4.
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / protector.h
1 /* $DragonFly: src/gnu/usr.bin/cc34/cc_prep/protector.h,v 1.1 2004/06/19 10:34:17 joerg Exp $ */
2 /* RTL buffer overflow protection function for GNU C compiler
3    Copyright (C) 2003 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22
23 /* Declare GUARD variable.  */
24 #define GUARD_m         Pmode
25 #define UNITS_PER_GUARD                                         \
26   MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
27
28 #ifndef L_stack_smash_handler
29
30 /* Insert a guard variable before a character buffer and change the order
31  of pointer variables, character buffers and pointer arguments.  */
32
33 extern void prepare_stack_protection  (int);
34
35 #ifdef TREE_CODE
36 /* Search a character array from the specified type tree.  */
37
38 extern int search_string_def (tree);
39 #endif
40
41 /* Examine whether the input contains frame pointer addressing.  */
42
43 extern int contains_fp (rtx);
44
45 /* Return size that is not allocated for stack frame. It will be allocated
46    to modify the home of pseudo registers called from global_alloc.  */
47
48 extern HOST_WIDE_INT get_frame_free_size (void);
49
50 /* Allocate a local variable in the stack area before character buffers
51    to avoid the corruption of it.  */
52
53 extern rtx assign_stack_local_for_pseudo_reg (enum machine_mode,
54                                               HOST_WIDE_INT, int);
55
56 #endif