1
/* Machine/OS specific configuration information for GNUstep
3
Please NOTE - GSConfig.h is generated by the configure script from the
4
file GSConfig.h.in - changes/fixes need to be made to the original file,
5
not to the GSConfig.h generated from it.
7
Copyright (C) 1998,1999 Free Software Foundation, Inc.
9
Written by: Richard frith-Macdonald <richard@brainstorm.co.uk>
11
This file is part of the GNUstep Base Library.
13
This library is free software; you can redistribute it and/or
14
modify it under the terms of the GNU Library General Public
15
License as published by the Free Software Foundation; either
16
version 2 of the License, or (at your option) any later version.
18
This library is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
Library General Public License for more details.
23
You should have received a copy of the GNU Library General Public
24
License along with this library; if not, write to the Free
25
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
28
#ifndef included_GSConfig_h
29
#define included_GSConfig_h
31
/* An alternate to GS_FAKE_MAIN which forces the user to call the
32
NSProcessInfo initialization in 'main', GS_FAKE_MAIN must also
34
#if @GS_PASS_ARGUMENTS@
35
#define GS_PASS_ARGUMENTS @GS_PASS_ARGUMENTS@
38
#define GS_FAKE_MAIN @GS_FAKE_MAIN@
42
* NOTE - if GS_FAKE_MAIN (above) is set to 1, this hack applies - and you
43
* must make sure that this file is included in any file that implements
44
* the 'main()' function and links with the GNUstep base libarary.
45
* You should NOT include this file in a program that does not link with
47
* This file is included automatically in NSObject.h and Foundation.h
49
* The Foundation classe NSProcessInfo need access to the argc, argv,
50
* and env variables of the main() function. The purpose of this (ugly hack)
51
* definition is to give the gstep-base library the opportunity to implement
52
* its own main function with private access to the global vars. The private
53
* main() implementation (in NSProcessInfo.m) will then call the user defined
54
* gnustep_base_user_main() function.
56
* The original hack was -
57
** Written by: Georg Tuparev, EMBL & Academia Naturalis,
58
** Heidelberg, Germany
59
** Tuparev@EMBL-Heidelberg.de
61
** NOTE! This is very dirty and dangerous trick. I spend several hours
62
** on thinking and man pages browsing, but couldn't find better solution.
63
** I know that I will spend 666 years in the Computer Hell for writing
64
** this hack, and the master devil (Bully Boy) will send me to write
66
** BTW, for writing this hack I got personal congratulations from Dennis
67
** Ritchie and Bjarne Stroustrup sent me a bunch of flowers and asked me
68
** to participate in the standardization committee for C-- v.6.0 as
69
** responsible for the new Tab-Overriding-Operator and Scope-Sensitive-
70
** Comments ... but this makes my situation even worse ;-)
73
* On some systems, there are other relatively clean workarounds, if this
74
* applies to the system you are running on, your configuration script
75
* should have set GS_FAKE_MAIN to zero, so that this define hack will
79
#define main gnustep_base_user_main
80
extern int gnustep_base_user_main (/* int argc, char *argv[] */);
82
#endif /* GS_FAKE_MAIN */
86
* Definition to specify if your processor stores words with the most
87
* significant byte first (like Motorola and SPARC, unlike Intel and VAX).
89
#define GS_WORDS_BIGENDIAN @GS_WORDS_BIGENDIAN@
92
* Size definitions for standard types
94
#define GS_SIZEOF_SHORT @ac_cv_sizeof_short@
95
#define GS_SIZEOF_INT @ac_cv_sizeof_int@
96
#define GS_SIZEOF_LONG @ac_cv_sizeof_long@
97
#define GS_SIZEOF_LONG_LONG @ac_cv_sizeof_long_long@
98
#define GS_SIZEOF_FLOAT @ac_cv_sizeof_float@
99
#define GS_SIZEOF_DOUBLE @ac_cv_sizeof_double@
100
#define GS_SIZEOF_VOIDP @ac_cv_sizeof_voidp@
103
* Size information to be places in bits 5 and 6 of type encoding bytes
104
* in archives (bits 0 to 4 are used for basic type info and bit 7 is
105
* used to mark cross-references to previously encoded objects).
107
#define _GSC_S_SHT @_GSC_S_SHT@
108
#define _GSC_S_INT @_GSC_S_INT@
109
#define _GSC_S_LNG @_GSC_S_LNG@
110
#define _GSC_S_LNG_LNG @_GSC_S_LNG_LNG@
113
* Type definitions for types with known sizes.
115
typedef @GS_SINT8@ gss8;
116
typedef @GS_UINT8@ gsu8;
117
typedef @GS_SINT16@ gss16;
118
typedef @GS_UINT16@ gsu16;
119
typedef @GS_SINT32@ gss32;
120
typedef @GS_UINT32@ gsu32;
121
typedef @GS_SINT64@ gss64;
122
typedef @GS_UINT64@ gsu64;
123
typedef @GS_SINT128@ gss128;
124
typedef @GS_UINT128@ gsu128;
125
typedef @GS_FLT32@ gsf32;
126
typedef @GS_FLT64@ gsf64;
129
* Integer type with same size as a pointer
131
typedef @GS_ADDR@ gsaddr;
134
* Do we have real 64-bit and 128-bit integers or are we just pretending.
136
#define GS_HAVE_I64 @GS_HAVE_I64@
137
#define GS_HAVE_I128 @GS_HAVE_I128@
140
* Do we have zlib for file handle compression?
142
#define USE_ZLIB @USE_ZLIB@
145
* Do we have the GNU Multiple-precision library for NSDecimal?
147
//#define USE_GMP @USE_GMP@
151
* Macros to deal with hiding an object from the garbage collector
152
* This macro employs the procesor-dependent knowledge that a pointer to an
153
* object will always be on an even address boundary. If we ever port to a
154
* system where this is not the case, we will have to find another mechanism.
160
#define GS_GC_HIDE(obj) ((id)(((gsaddr)obj) | 1))
161
#define GS_GC_UNHIDE(obj) ((id)(((gsaddr)obj) & ~1))
163
#define GS_GC_HIDE(obj) ((id)obj)
164
#define GS_GC_UNHIDE(obj) ((id)obj)
168
* Define to say if we use NXConstantString or NSConstantString
170
#define NXConstantString @NX_CONST_STRING_CLASS@
173
* Ensure some standard types are defined.
180
#endif /* included_GSConfig_h */