Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / cppconf.h
blobb2bf1c76331eef3da652ece89d8c13861998bd8b
1 /* Definitions for CPP library.
2 Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3 Written by Per Bothner, 1994-95.
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 In other words, you are welcome to use, share and improve this program.
20 You are forbidden to forbid anyone else to use, share and improve
21 what you give them. Help stamp out software-hoarding! */
23 # ifndef CPPCONF_H
24 # define CPPCONF_H
26 /* We're using CPP library from GCC, which expects (its) configure to set
27 * some definition depending on the host/target the compiler is going to be
28 * built for. We don't have the distinction between host/target, but we keep,
29 * for compatibility, the distinction.
30 * Should use (splint's) configure to set these -- these are just guesses!
31 */
33 /*@constant int BITS_PER_UNIT = 8@*/
34 # define BITS_PER_UNIT 8
36 /*@constant size_t BITS_PER_CHAR@*/
37 # define BITS_PER_CHAR 8
39 /*@constant size_t BITS_PER_WORD@*/
40 # define BITS_PER_WORD 32
42 /*@constant size_t HOST_BITS_PER_INT@*/
43 # define HOST_BITS_PER_INT 32
45 /*@constant size_t HOST_BITS_PER_LONG = 32@*/
46 # define HOST_BITS_PER_LONG 32
48 /*@constant char TARGET_BELL@*/
49 # define TARGET_BELL (char) 6
51 /*@constant char TARGET_BS@*/
52 # define TARGET_BS (char) 7
54 /*@constant char TARGET_FF@*/
55 # define TARGET_FF (char) 8
57 /*@constant char TARGET_NEWLINE@*/
58 # define TARGET_NEWLINE '\n'
60 /*@constant char TARGET_CR@*/
61 # define TARGET_CR '\n'
63 /*@constant char TARGET_TAB@*/
64 # define TARGET_TAB '\t'
66 /*@constant char TARGET_VT@*/
67 # define TARGET_VT '\v'
70 #ifndef HOST_BITS_PER_WIDE_INT
72 #if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
73 /*@constant int HOST_BITS_PER_WIDE_INT@*/
74 #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
75 /*@notfunction@*/
76 #define HOST_WIDE_INT long
77 #else
78 /*@constant int HOST_BITS_PER_WIDE_INT@*/
79 #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
80 /*@notfunction@*/
81 #define HOST_WIDE_INT long
82 #endif
84 #endif
86 #ifndef INT_TYPE_SIZE
87 /*@constant size_t INT_TYPE_SIZE@*/
88 #define INT_TYPE_SIZE BITS_PER_WORD
89 #endif
91 #ifndef LONG_TYPE_SIZE
92 /*@constant size_t LONG_TYPE_SIZE@*/
93 #define LONG_TYPE_SIZE BITS_PER_WORD
94 #endif
96 #ifndef WCHAR_TYPE_SIZE
97 /*@constant size_t WCHAR_TYPE_SIZE@*/
98 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
99 #endif
101 # ifndef CHAR_TYPE_SIZE
102 /*@constant size_t CHAR_TYPE_SIZE@*/
103 # define CHAR_TYPE_SIZE BITS_PER_CHAR
104 # endif
106 #ifndef MAX_CHAR_TYPE_SIZE
107 /*@constant size_t MAX_CHAR_TYPE_SIZE@*/
108 #define MAX_CHAR_TYPE_SIZE CHAR_TYPE_SIZE
109 #endif
111 #ifndef MAX_LONG_TYPE_SIZE
112 /*@constant size_t MAX_LONG_TYPE_SIZE@*/
113 #define MAX_LONG_TYPE_SIZE LONG_TYPE_SIZE
114 #endif
116 #ifndef MAX_WCHAR_TYPE_SIZE
117 /*@constant size_t MAX_WCHAR_TYPE_SIZE@*/
118 #define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE
119 #endif
121 # else
122 # error "Multiple include"
123 # endif