1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 * This redundant definition of TRUE and FALSE works around
22 * a limitation of Decus C.
30 * Define the HOST operating system. This is needed so that
31 * cpp can use appropriate filename conventions.
61 #define HOST SYS_UNKNOWN
65 * We assume that the target is the same as the host system
72 * In order to predefine machine-dependent constants,
73 * several strings are defined here:
75 * MACHINE defines the target cpu (by name)
76 * SYSTEM defines the target operating system
77 * COMPILER defines the target compiler
79 * The above may be #defined as "" if they are not wanted.
80 * They should not be #defined as NULL.
82 * LINE_PREFIX defines the # output line prefix, if not "line"
83 * This should be defined as "" if cpp is to replace
84 * the "standard" C pre-processor.
86 * FILE_LOCAL marks functions which are referenced only in the
87 * file they reside. Some C compilers allow these
88 * to be marked "static" even though they are referenced
89 * by "extern" statements elsewhere.
91 * OK_DOLLAR Should be set TRUE if $ is a valid alphabetic character
92 * in identifiers (default), or zero if $ is invalid.
95 * OK_CONCAT Should be set TRUE if # may be used to concatenate
96 * tokens in macros (per the Ansi Draft Standard) or
97 * FALSE for old-style # processing (needed if cpp is
98 * to process assembler source code).
100 * OK_DATE Predefines the compilation date if set TRUE.
101 * Not permitted by the Nov. 12, 1984 Draft Standard.
103 * S_CHAR etc. Define the sizeof the basic TARGET machine word types.
104 * By default, sizes are set to the values for the HOST
105 * computer. If this is inappropriate, see the code in
106 * cpp3.c for details on what to change. Also, if you
107 * have a machine where sizeof (signed int) differs from
108 * sizeof (unsigned int), you will have to edit code and
109 * tables in cpp3.c (and extend the -S option definition.)
111 * CPP_LIBRARY May be defined if you have a site-specific include directory
112 * which is to be searched *before* the operating-system
113 * specific directories.
116 #if TARGET == SYS_LATTICE
118 * We assume the operating system is pcdos for the IBM-PC.
119 * We also assume the small model (just like the PDP-11)
121 #define MACHINE "i8086"
122 #define SYSTEM "pcdos"
125 #if TARGET == SYS_ONYX
126 #define MACHINE "z8000"
127 #define SYSTEM "unix"
130 #if TARGET == SYS_VMS
131 #define MACHINE "vax"
133 #define COMPILER "vax11c"
136 #if TARGET == SYS_RSX
137 #define MACHINE "pdp11"
139 #define COMPILER "decus"
142 #if TARGET == SYS_RT11
143 #define MACHINE "pdp11"
144 #define SYSTEM "rt11"
145 #define COMPILER "decus"
148 #if TARGET == SYS_68000 || defined(M68000) || defined(m68000) || defined(m68k)
150 * All three machine designators have been seen in various systems.
151 * Warning -- compilers differ as to sizeof (int). cpp3 assumes that
154 #define MACHINE "M68000", "m68000", "m68k"
155 #define SYSTEM "unix"
158 #if TARGET == SYS_UNIX
159 #define SYSTEM "unix"
161 #define MACHINE "pdp11"
164 #define MACHINE "vax"
173 #define MSG_PREFIX "cpp: "
177 #define LINE_PREFIX ""
181 * OLD_PREPROCESSOR forces the definition of OK_DOLLAR, OK_CONCAT,
182 * COMMENT_INVISIBLE, and STRING_FORMAL to values appropriate for
183 * an old-style preprocessor.
186 #ifndef OLD_PREPROCESSOR
187 #define OLD_PREPROCESSOR FALSE
191 #define OK_DOLLAR FALSE
192 #define OK_CONCAT TRUE
193 #define COMMENT_INVISIBLE TRUE
194 #define STRING_FORMAL TRUE
195 #define IDMAX 63 /* actually, seems to be unlimited */
199 * RECURSION_LIMIT may be set to -1 to disable the macro recursion test.
201 #ifndef RECURSION_LIMIT
202 #define RECURSION_LIMIT 1000
206 * BITS_CHAR may be defined to set the number of bits per character.
207 * it is needed only for multi-byte character constants.
214 * COMMENT_INVISIBLE may be defined to allow "old-style" comment
215 * processing, whereby the comment becomes a zero-length token
216 * delimiter. This permitted tokens to be concatenated in macro
217 * expansions. This was removed from the Draft Ansi Standard.
219 #ifndef COMMENT_INVISIBLE
220 #define COMMENT_INVISIBLE FALSE
224 * STRING_FORMAL may be defined to allow recognition of macro parameters
225 * anywhere in replacement strings. This was removed from the Draft Ansi
226 * Standard and a limited recognition capability added.
228 #ifndef STRING_FORMAL
229 #define STRING_FORMAL FALSE
233 * OK_DOLLAR enables use of $ as a valid "letter" in identifiers.
234 * This is a permitted extension to the Ansi Standard and is required
235 * for e.g., VMS, RSX-11M, etc. It should be set FALSE if cpp is
236 * used to preprocess assembler source on Unix systems. OLD_PREPROCESSOR
237 * sets OK_DOLLAR FALSE for that reason.
240 #define OK_DOLLAR TRUE
244 * OK_CONCAT enables (one possible implementation of) token concatenation.
245 * If cpp is used to preprocess Unix assembler source, this should be
246 * set FALSE as the concatenation character, #, is used by the assembler.
249 #define OK_CONCAT TRUE
253 * OK_DATE may be enabled to predefine today's date as a string
254 * at the start of each compilation. This is apparently not permitted
255 * by the Draft Ansi Standard.
262 * The following definitions are used to allocate memory for
263 * work buffers. In general, they should not be modified
266 * PAR_MAC The maximum number of #define parameters (31 per Standard)
267 * Note: we need another one for strings.
268 * IDMAX The longest identifier, 31 per Ansi Standard
269 * NBUFF Input buffer size
270 * NWORK Work buffer size -- the longest macro
271 * must fit here after expansion.
272 * NEXP The nesting depth of #if expressions
273 * NINCLUDE The number of directories that may be specified
274 * on a per-system basis, or by the -I option.
275 * BLK_NEST The number of nested #if's permitted.
276 * NFWORK FileNameWorkBuffer (added by erAck, was NWORK)
283 #define PAR_MAC (253 + 1)
285 #define PAR_MAC (31 + 1)
287 /* NWORK wg. grooossen Makros in *.src erhoeht,
288 da wir bald 10 Sprachen haben werden gleich ordentlich reingehauen.. */
294 #define NPARMWORK (NWORK * 2)
302 #define ALERT '\007' /* '\a' is "Bell" */
307 #define VT '\013' /* Vertical Tab CTRL/K */
313 #define FILE_LOCAL static
316 #define FILE_LOCAL static
318 #define FILE_LOCAL /* Others are global */
323 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */