~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Headers/Additions/GNUstepBase/GSConfig.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Machine/OS specific configuration information for GNUstep
 
2
 
 
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.
 
6
 
 
7
   Copyright (C) 1998,1999 Free Software Foundation, Inc.
 
8
 
 
9
   Written by:  Richard frith-Macdonald <richard@brainstorm.co.uk>
 
10
 
 
11
   This file is part of the GNUstep Base Library.
 
12
 
 
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.
 
17
 
 
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.
 
22
 
 
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.
 
26
   */
 
27
 
 
28
#ifndef included_GSConfig_h
 
29
#define included_GSConfig_h
 
30
 
 
31
/* An alternate to GS_FAKE_MAIN which forces the user to call the 
 
32
   NSProcessInfo initialization in 'main', GS_FAKE_MAIN must also
 
33
   be undefined. */
 
34
#if @GS_PASS_ARGUMENTS@
 
35
#define GS_PASS_ARGUMENTS @GS_PASS_ARGUMENTS@
 
36
#endif
 
37
 
 
38
#define GS_FAKE_MAIN    @GS_FAKE_MAIN@
 
39
#if     GS_FAKE_MAIN
 
40
 
 
41
/*
 
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
 
46
 * the base library.
 
47
 * This file is included automatically in NSObject.h and Foundation.h
 
48
 *
 
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.
 
55
 *
 
56
 * The original hack was -
 
57
 ** Written by:  Georg Tuparev, EMBL & Academia Naturalis,
 
58
 **              Heidelberg, Germany
 
59
 **              Tuparev@EMBL-Heidelberg.de
 
60
 **
 
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
 
65
 ** Windowz software.
 
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 ;-)
 
71
 ** - Georg
 
72
 *
 
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
 
76
 * not be used.
 
77
 */
 
78
 
 
79
#define main gnustep_base_user_main
 
80
extern int gnustep_base_user_main (/* int argc, char *argv[] */);
 
81
 
 
82
#endif  /* GS_FAKE_MAIN */
 
83
 
 
84
 
 
85
/*
 
86
 * Definition to specify if your processor stores words with the most
 
87
 * significant byte first (like Motorola and SPARC, unlike Intel and VAX).
 
88
 */
 
89
#define GS_WORDS_BIGENDIAN      @GS_WORDS_BIGENDIAN@
 
90
 
 
91
/*
 
92
 *      Size definitions for standard types
 
93
 */
 
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@
 
101
 
 
102
/*
 
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).
 
106
 */
 
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@
 
111
 
 
112
/*
 
113
 * Type definitions for types with known sizes.
 
114
 */
 
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;
 
127
 
 
128
/*
 
129
 * Integer type with same size as a pointer
 
130
 */
 
131
typedef @GS_ADDR@ gsaddr;
 
132
 
 
133
/*
 
134
 *      Do we have real 64-bit and 128-bit integers or are we just pretending.
 
135
 */
 
136
#define GS_HAVE_I64     @GS_HAVE_I64@
 
137
#define GS_HAVE_I128    @GS_HAVE_I128@
 
138
 
 
139
/*
 
140
 *      Do we have zlib for file handle compression?
 
141
 */
 
142
#define USE_ZLIB        @USE_ZLIB@
 
143
 
 
144
/*
 
145
 *      Do we have the GNU Multiple-precision library for NSDecimal?
 
146
 */
 
147
//#define USE_GMP       @USE_GMP@
 
148
#define USE_GMP 0
 
149
 
 
150
/*
 
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.
 
155
 */
 
156
#ifndef GS_WITH_GC
 
157
#define GS_WITH_GC      0
 
158
#endif
 
159
#if     GS_WITH_GC
 
160
#define GS_GC_HIDE(obj)         ((id)(((gsaddr)obj) | 1))
 
161
#define GS_GC_UNHIDE(obj)       ((id)(((gsaddr)obj) & ~1))
 
162
#else
 
163
#define GS_GC_HIDE(obj)         ((id)obj)
 
164
#define GS_GC_UNHIDE(obj)       ((id)obj)
 
165
#endif
 
166
 
 
167
/*
 
168
 * Define to say if we use NXConstantString or NSConstantString
 
169
 */
 
170
#define NXConstantString        @NX_CONST_STRING_CLASS@
 
171
 
 
172
/*
 
173
 * Ensure some standard types are defined.
 
174
 */
 
175
@INCLUDE_STDINT@
 
176
@DEFINE_UINT8_T@
 
177
@DEFINE_INT32_T@
 
178
@DEFINE_INT64_T@
 
179
 
 
180
#endif  /* included_GSConfig_h */
 
181