import of gcc-2.8
[official-gcc.git] / gcc / config / vax / xm-vms.h
blobba87e656d39231e3d77e1d6001e0f90d606c7561
1 /* Configuration for GNU C-compiler for Vax.
2 Copyright (C) 1987, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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.
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.
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. */
21 /* #defines that need visibility everywhere. */
22 #define FALSE 0
23 #define TRUE 1
25 /* Other configurations get these via autoconfig. */
26 #define STDC_HEADERS 1
27 #define HAVE_STDLIB_H 1
28 #define HAVE_STRING_H 1
30 #if defined(VAXC) || defined(__DECC)
31 /* if compiling with VAXC, need to fix problem with <stdio.h>
32 which defines a macro called FILE_TYPE that breaks "tree.h".
33 Fortunately it uses #ifndef to suppress multiple inclusions.
34 Three possible cases:
35 1) <stdio.h> has already been included -- ours will be no-op;
36 2) <stdio.h> will be included after us -- "theirs" will be no-op;
37 3) <stdio.h> isn't needed -- including it here shouldn't hurt.
38 In all three cases, the problem macro will be removed here. */
39 #include <stdio.h>
40 #undef FILE_TYPE
41 #endif
43 /* target machine dependencies.
44 tm.h is a symbolic link to the actual target specific file. */
45 #include "tm.h"
47 /* This describes the machine the compiler is hosted on. */
48 #define HOST_BITS_PER_CHAR 8
49 #define HOST_BITS_PER_SHORT 16
50 #define HOST_BITS_PER_INT 32
51 #define HOST_BITS_PER_LONG 32
52 #define HOST_BITS_PER_LONGLONG 64
54 #define HOST_FLOAT_FORMAT VAX_FLOAT_FORMAT
56 #define SUCCESS_EXIT_CODE 1
57 #define FATAL_EXIT_CODE (44 | 0x10000000) /* Abort, and no DCL message. */
59 /* A couple of conditionals for execution machine are controlled here. */
60 #ifndef VMS
61 #define VMS
62 #endif
64 #ifndef __GNUC__
65 /* not present, at least in VAX-11 C (VMS) v2.2 */
66 #define R_OK 4
67 #define W_OK 2
68 #define X_OK 1
69 #define F_OK 0
70 #endif
72 #define GCC_INCLUDE_DIR "///not used with VMS///" /* nonsense string for now */
74 /* and define a local equivalent (sort of) for unlink */
75 #define unlink remove
77 /* Used by the preprocessor to limit size of disk I/O chunks.
78 64K - 1 is the maximum supported by VAXCRTL. Amounts in excess
79 of 35 blocks will bypass the VMS V6.x VIOC [Virtual I/O Cache],
80 so we'll pick a limit of 16K (32 blocks). */
81 #define MAX_READ_LEN (32 * 512)
82 #define MAX_WRITE_LEN (32 * 512)
84 /* Under VMS a directory specification can be enclosed either in square
85 brackets or in angle brackets. Thus we need to check both. This
86 macro is used to help compare filenames in cp-lex.c.
88 We also need to make sure that the names are all lower case, because
89 we must be able to compare filenames to determine if a file implements
90 a class. */
92 #define FILE_NAME_NONDIRECTORY(C) \
93 ({ \
94 char * pnt_ = (C), * pnt1_; \
95 pnt1_ = pnt_ - 1; \
96 while (*++pnt1_) \
97 if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \
98 pnt1_ = rindex (pnt_, ']'); \
99 pnt1_ = (pnt1_ == 0 ? rindex (pnt_, '>') : pnt1_); \
100 pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_); \
101 (pnt1_ == 0 ? pnt_ : pnt1_ + 1); \
104 /* Macro to generate the name of the cross reference file. The standard
105 one does not work, since it was written assuming that the conventions
106 of a unix style filesystem will work on the host system. */
108 #define XREF_FILE_NAME(BUFF, NAME) \
109 s = FILE_NAME_NONDIRECTORY (NAME); \
110 if (s == NAME) sprintf(BUFF, "%s_gxref", NAME); \
111 else { \
112 strcpy(BUFF, NAME); \
113 strcat(BUFF, "_gxref"); \
116 /* Macro that is used in cp-xref.c to determine whether a file name is
117 absolute or not. */
119 #define FILE_NAME_ABSOLUTE_P(NAME) \
120 (FILE_NAME_NONDIRECTORY (NAME) != (&NAME[1]))
122 /* FILE_NAME_JOINER is defined to be the characters that are inserted between
123 a directory name and a filename in order to make an absolute file
124 specification. Under VMS the directory specification contains all of the
125 required characters, so we define this to be a null string. */
127 #define FILE_NAME_JOINER ""
129 /* vprintf() has been available since VMS V4.6. */
131 #define HAVE_VPRINTF
133 #if defined(VAXC) || defined(__DECC)
134 /* Customizations/kludges for building with DEC's VAX C compiler
135 rather than GCC. */
136 #define NO_SYS_PARAMS_H /* don't have <sys/params.h> */
137 #define NO_STAB_H /* don't have <stab.h> */
138 #define USE_C_ALLOCA /* using alloca.c */
139 #define QSORT_WORKAROUND /* do not use VAXCRTL's qsort */
141 /* use ANSI/SYSV style byte manipulation routines instead of BSD ones */
142 /* rename all too-long external symbol names to avoid warnings */
143 #define bc_check_for_full_enumeration_handling bc_check_for_full_enum_handling
144 #define check_for_full_enumeration_handling check_for_full_enum_handling
145 #define current_function_contains_functions curfunc_contains_functions
146 #define current_function_epilogue_delay_list curfunc_epilogue_delay_list
147 #define current_function_has_nonlocal_goto curfunc_has_nonlocal_goto
148 #define current_function_has_nonlocal_label curfunc_has_nonlocal_label
149 #define current_function_internal_arg_pointer curfunc_internal_arg_pointer
150 #define current_function_outgoing_args_size curfunc_outgoing_args_size
151 #define current_function_pretend_args_size curfunc_pretend_args_size
152 #define current_function_returns_pcc_struct curfunc_returns_pcc_struct
153 #define current_function_returns_pointer curfunc_returns_pointer
154 #define current_function_uses_const_pool curfunc_uses_const_pool
155 #define current_function_uses_pic_offset_table curfunc_uses_pic_offset_table
156 #define dbxout_resume_previous_source_file dbxout_resume_previous_src_file
157 #define expand_builtin_extract_return_addr expand_builtin_extract_ret_addr
158 #define expand_builtin_set_return_addr_reg expand_builtin_set_ret_addr_reg
159 #define expand_start_loop_continue_elsewhere expnd_start_loop_cont_elsewhere
160 #define flag_schedule_insns_after_reload flag_sched_insns_after_reload
161 #define get_dynamic_handler_chain_libfunc get_dynamic_hndlr_chain_libfunc
162 #define lookup_name_current_level_global lookup_name_current_level_gbl
163 #define maybe_building_objc_message_expr maybe_building_objc_msg_expr
164 #define mesg_implicit_function_declaration mesg_implicit_func_declaration
165 #define output_deferred_addressed_constants output_deferred_addr_constants
166 #define protect_cleanup_actions_with_terminate protect_cleanup_act_w_terminate
167 #define reg_overlap_mentioned_for_reload_p reg_overlap_mtnd_for_reload_p
168 #define reposition_prologue_and_epilogue_notes repos_prolog_and_epilog_notes
169 #define rtx_equal_function_value_matters rtx_equal_func_value_matters
170 #define set_new_first_and_last_label_num set_new_first_and_last_lbl_num
171 #define thread_prologue_and_epilogue_insns thread_prolog_and_epilog_insns
172 #endif
174 /* We need to avoid the library qsort routine, due to a serious bug
175 in VAXCRTL. (Sorting anything with size that's not a multiple of 4
176 after having previously sorted something that was a multiple of 4
177 can produce wrong results and result in data corruption.) We'll
178 use our own substitute (in vax.c) instead. */
179 /* #define QSORT_WORKAROUND */
180 #ifdef QSORT_WORKAROUND
181 #define qsort not_qsort
182 #endif
184 #ifdef __DECC
185 /* DECC$SHR doesn't have VAXCRTL's bugs. */
186 #undef QSORT_WORKAROUND
187 #undef qsort
188 /* Avoid a lot of informational level diagnostics about implicitly
189 declared functions. */
190 #include <stdlib.h>
191 #include <string.h>
192 /* this is for genopinit.c */
193 #pragma message disable (undefescap)
194 #endif
196 #if defined(USE_C_ALLOCA) && !defined(alloca)
197 /* Declare alloca() using similar logic to that in alloca.c. */
198 #ifdef __STDC__
199 extern void *alloca(unsigned);
200 #else
201 extern char *alloca();
202 #endif
203 #endif