
/* Portable Object Compiler (c) 1997,98.  All Rights Reserved.
 *
 * @WARNING@
 */

#ifndef OBJCRT_CONFIG_H
#define OBJCRT_CONFIG_H

/* On some machines, the names _alloc, _error etc. are defined in a
 * system library.  Avoid name clash by using the following macros
 * in our sources, while not changing a thing on platforms where
 * this isn't a problem.
 *
 * Define '1' to use oc_objcInit, define '0' to use classical objcInit.
 */

#define OBJCRT_USE_PREFIXED_NAMES @OBJCRT_USE_PREFIXED_NAMES@

/* The following is used in the c++ grammar
 *
 * Define '1' if your lex has a yyless() function.  Otherwise '0'.
 */

#define OBJCRT_USE_YYLESS @OBJCRT_USE_YYLESS@

/*
 * For cross compiles with some versions of the Linux Stepstone objcc
 * (problem with assert.h on some Linuxes, or well, one of the problems!).
 *
 * Note that an undefined #pragma emits a warning on HP-UX cc.
 */

#define OBJCRT_LINUX @OBJCRT_LINUX@

#if OBJCRT_LINUX
#pragma OCbuiltInVar __PRETTY_FUNCTION__
#endif /* OBJCRT_LINUX */

/*
 * On some machines we don't have a stdarg.h header file.
 * If OBJCRT_USE_STDARG is 0, then we #include varargs.h (e.g. SunOS4)
 * va_start & co are needed for methods such as +sprintf:
 */

#define OBJCRT_USE_STDARG @OBJCRT_USE_STDARG@

#if OBJCRT_USE_STDARG
#include "stdarg.h"
#define OC_VA_LIST va_list
#define OC_VA_START(ap,larg) va_start(ap,larg)
#define OC_VA_ARG(ap,type) va_arg(ap,type)
#define OC_VA_END(ap) va_end(ap)
#else
#include "varargs.h"
#define OC_VA_LIST va_list
#define OC_VA_START(ap,larg) va_start(ap)
#define OC_VA_ARG(ap,type) va_arg(ap,type)
#define OC_VA_END(ap) va_end(ap)
#endif /* OBJCRT_USE_STDARG */

/*
 * stes 12/97
 * Some machines have a snprintf() that allows to check for
 * buffer overflow.  If we have this, use it in the String class.
 */

#define OBJCRT_USE_SNPRINTF @OBJCRT_USE_SNPRINTF@

/*
 * stes 10/97
 * This should work everywhere, but let's take no risk
 *
 */

#define OBJCRT_USE_MEMSET @OBJCRT_USE_MEMSET@

/*
 * stes 11/97
 * Define (on WIN32) as __declspec(dllexport) or similar,
 * when building an OBJCRT.DLL (compile with -DOBJCRTDLL)
 *
 */

#ifdef OBJCRTDLL
#define EXPORT @OBJCRTEXPORT@
#else
#define EXPORT /* null */
#endif /* OBJCRTDLL */

/*
 * For some cross-compiles, notably those with some Stepstone
 * all C messenger compilers, we want to prevent a clash between
 * our definition (which doesn't use SHR) and theirs.
 *
 * For all other compilers, including most Stepstone 3 arg messenger
 * compilers,  OBJCRT_PROTOTYPE_MESSENGER is defined as "1".
 */

#define OBJCRT_PROTOTYPE_MESSENGER @OBJCRT_PROTOTYPE_MESSENGER@

/*
 * See comment in objcrt.m.  For compilers that do not support common
 * storage of globals at all, this must be defined as '1'.
 */

#define OBJCRT_SCOPE_OBJCMODULES_EXTERN @OBJCRT_SCOPE_OBJCMODULES_EXTERN@

/*
 * Compiled in path separator. (Module.m and objc.m)
 */
 
#define OBJCRT_DEFAULT_PATHSEPC "@PATHSEPC@"

/*
 * On the Macintosh (with metrowerks at least) we cannot make a call
 * to system() in the driver
 *
 */

#define OBJC_HAVE_SYSTEM_CALL @OBJC_HAVE_SYSTEM_CALL@

#endif /* OBJCRT_CONFIG_H */

