libs-base/Headers/gnustep/base/preface.h.in

115 lines
3 KiB
C
Raw Normal View History

/* General purpose definitions for the GNU Objective-C Library.
Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
Created: May 1993
This file is part of the GNUstep Base Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __preface_h_OBJECTS_INCLUDE
#define __preface_h_OBJECTS_INCLUDE
#include <gnustep/base/config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <gnustep/base/objc-gnu2next.h>
#include <gnustep/base/fake-main.h>
#if NeXT_runtime
#include <objc/objc.h>
#include <objc/objc-class.h>
#include <objc/objc-runtime.h>
#ifndef _C_ATOM
#define _C_ATOM '%'
#endif
#define _F_CONST 0x01
#define _F_IN 0x01
#define _F_OUT 0x02
#define _F_INOUT 0x03
#define _F_BYCOPY 0x04
#define _F_ONEWAY 0x08
#define _C_CONST 'r'
#define _C_IN 'n'
#define _C_INOUT 'N'
#define _C_OUT 'o'
#define _C_BYCOPY 'O'
#define _C_ONEWAY 'V'
#else /* GNU Objective C Runtime */
#include <objc/objc.h>
#include <objc/objc-api.h>
#include <objc/encoding.h>
#include <objc/sarray.h>
/* #include <objc/objc-list.h> */
#endif
#include <Foundation/NSObject.h>
#include <gnustep/base/objc-malloc.h>
@class String;
/* The following group of lines maintained by the gstep-base src/Makefile */
#define @VERSION@
#define @MAJOR_VERSION@
#define @MINOR_VERSION@
#define @SUBMINOR_VERSION@
#define @GCC_VERSION@
#define @LIBRARY_NAME@
#define @PACKAGE_NAME@
#if 0
extern const char o_version[];
extern const char o_gcc_version[];
#if NeXT_cc
extern const char o_NeXT_cc_version[];
#endif
#endif
#ifndef MAX
#define MAX(a,b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a > _b ? _a : _b; })
#endif
#ifndef MIN
#define MIN(a,b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a < _b ? _a : _b; })
#endif
#ifndef ABS
#define ABS(a) \
({typedef _ta = (a); \
_ta _a = (a); \
_a < 0 ? -_a : _a; })
#endif
#ifndef STRINGIFY
#define STRINGIFY(s) XSTRINGIFY(s)
#define XSTRINGIFY(s) #s
#endif
#ifndef PTR2LONG
#define PTR2LONG(P) (((char*)(P))-(char*)0)
#endif
#ifndef LONG2PTR
#define LONG2PTR(L) (((char*)0)+(L))
#endif
#endif /* __preface_h_OBJECTS_INCLUDE */