GNUstep Base

Authors

Richard Frith-Macdonald

Version: $Revision$

Date: $Date$

Base

The GNUstep base library is a free software package implementing the API of the OpenStep Foundation Kit (tm), including later additions.

Compatibility

GNUstep is generally compatible with the OpenStep specification and with recent developments of the MacOS (cocoa) API. Where MacOS deviates from the OpenStep API, GNUstep generally attempts to support both versions. In some cases the newer MacOS APIs are incompatible with OpenStep, and GNUstep usually supports the richer version.

In order to deal with compatiblity issues, GNUstep uses two mechanisms - it provides conditionally compiled sections of the library header files, so that software can be built that will conform strictly to a particular API, and it provides user default settings to control the behavior of the library at runtime.

Conditional compilation

Adding an option to a makefile to define one of the following preprocessor constants will modify the API visible to software being compiled -

NO_GNUSTEP
GNUstep specific extensions to the OpenStep and MacOS cocoa APIs are excluded from the headers.
STRICT_MACOS_X
Only methods and classes that are part of the MacOS cocoa API are made available in the headers.
STRICT_OPENSTEP
Only methods and classes that are part of the OpenStep specification are made available in the headers.

User defaults

Setting the user default GSMacOSXCompatible to YES will cause MacOS compatible behavior to be the default at runtime. This default may however be overridden to provide more fine grained control of system behavior.

GSMacOSXCompatibleGeometry
Specifies whether the functions for producing strings describing geometrical structures (NSStringFromPoint(), NSStringFromSize(), and NSStringFromRect()) should produce strings conforming to the OpenStep specification or to MacOS-X behavior. The functions for parsing those strings should cope with both cases anyway.

Environment variables

There are some environment variables used by GNUstep base, where there would be problems onbtaining data from the defaults asystem.

CRASH_ON_ABORT
The default exception handler will either cause the program to simply terminate, or to crash - leaving a core dump. The standard behavior is to leave a core dump if the library was built for debugging, and to simply exit if it was not.

The CRASH_ON_ABORT environment variable can be used to override this behavior. If this is defined to NO, FALSE, or 0 then the program will simply exit when an exception occurs. Any other value of the variable will cause the program to generate a core dump.

The Foundation classes

The OpenStep functions

The GNUstep extension classes