1
@node Compliance to Standards
2
@appendix GNUstep Compliance to Standards
3
@cindex standards, GNUstep compliance to
4
@cindex standards compliance
5
@cindex OpenStep compliance
6
@cindex OS X compatibility
8
GNUstep is generally compatible with the OpenStep specification and with
9
recent developments of the MacOS-X (Cocoa) API. Where MacOS deviates from the
10
OpenStep API, GNUstep generally attempts to support both versions. In some
11
cases the newer MacOS APIs are incompatible with OpenStep, and GNUstep usually
12
supports the richer version.
14
In order to deal with compatiblity issues, GNUstep uses two mechanisms - it
15
provides conditionally compiled sections of the library header files, so that
16
software can be built that will conform strictly to a particular API, and it
17
provides user default settings to control the behavior of the library at
20
@section Conditional Compilation
21
@cindex compilation, conditional
23
Adding an option to a makefile to define one of the following preprocessor
24
constants will modify the API visible to software being compiled -
27
GNUstep specific extensions to the OpenStep and MacOS cocoa APIs are
28
excluded from the headers.
31
@deffn {} STRICT_MACOS_X
32
Only methods and classes that are part of the MacOS cocoa API are made
33
available in the headers.
36
@deffn {} STRICT_OPENSTEP
37
Only methods and classes that are part of the OpenStep specification are
38
made available in the headers.
41
Note, these preprocessor constants are used in developer code (ie the code
42
that users of GNUstep write) rather than by the GNUstep software itself. They
43
permit a developer to ensure that he/she does not write code which depends
44
upon API not present on other implementations (in practice, MacOS-X or some
45
old OPENSTEP systems). The actual GNUstep libraries are always built with the
46
full GNUstep API in place, so that the feature set is as consistent as
50
@section User Defaults
51
@cindex user defaults, API compliance
53
User defaults may be specified ///
56
An array of strings that lists debug levels to be used within the
57
program. These debug levels are merged with any which were set on the command
58
line or added programmatically to the set given by the
59
[NSProcessInfo-debugSet] method.
63
Setting the user default GSLogSyslog to YES will cause log/debug output to be
64
sent to the syslog facility (on systems which support it), rather than to the
65
standard error stream. This is useful in environments where stderr has been
66
re-used strangely for some reason.
69
@deffn {} GSMacOSXCompatible
70
Setting the user default GSMacOSXCompatible to YES will cause MacOS compatible
71
behavior to be the default at runtime. This default may however be overridden
72
to provide more fine grained control of system behavior.
75
@deffn {} GSOldStyleGeometry
76
Specifies whether the functions for producing strings describing geometric
77
structures (NSStringFromPoint(), NSStringFromSize(), and NSStringFromRect())
78
should produce strings conforming to the OpenStep specification or to MacOS-X
79
behavior. The functions for parsing those strings should cope with both cases
84
May be used to specify a default SOCKS5 server (and optionally a port
85
separated from the server by a colon) to which tcp/ip connections made using
86
the NSFileHandle extension methods should be directed.
88
This default overrides the SOCKS5_SERVER and SOCKS_SERVER environment variables.
91
@deffn {} {Local Time Zone}
92
Used to specify the name of the timezone to be used by the NSTimeZone class.
95
@deffn {} NSWriteOldStylePropertyLists
96
Specifies whether text property-list output should be in the default MacOS-X
97
format (XML), or in the more human readable (but less powerful) original
100
Reading of property lists is supported in either format, but only if GNUstep
101
is built with the libxml library (which is needed to handle XML parsing).
103
NB. MacOS-X generates illegal XML for some strings - those which contain
104
characters not legal in XML. GNUstep always generates legal XML, at the cost
105
of a certain degree of compatibility. GNUstep XML property lists use a
106
backslash to escape illegal chatracters, and consequently any string
107
containing either a backslash or an illegal character will be written
108
differently to the same string on MacOS-X.
111
@deffn {} NSLanguages
112
An array of strings that lists the users prefered languages, in order or
113
preference. If not found the default is just English.