home *** CD-ROM | disk | FTP | other *** search
- /*+++*
- * title: compat.h
- * abstract: OPENSTEP/Rhapsody compatibility routines for mailapp-utilities.
- * author: Tom Hageman <tom@basil.icce.rug.nl>
- * created: January 1998
- * modified: (see RCS Log at end)
- * copyleft:
- *
- * Copyright (C) 1998 Tom R. Hageman, but otherwise perfect freeware.
- *
- * description:
- *
- *---*/
-
- #ifdef RCS_compat_ID
- static const char * const RCS_h_id = ((void)&RCS_h_id,
- "@(#)compat.h,v 1.2 1998/02/14 17:34:42");
- #endif
-
- #if (!defined(NS_TARGET) && !defined(NeXT))
- # warning Cannot determine NEXTSTEP/OPENSTEP/Rhapsody version.
- #elif (NS_TARGET < 40)
- # define NEXTSTEP 1
- #elif (NS_TARGET <= 41)
- # define OPENSTEP 1
- #else
- # define RHAPSODY 1
- #endif
-
- #if (OPENSTEP || RHAPSODY)
-
- #import <Foundation/Foundation.h>
-
- extern const char *NXGetDefaultValue(const char *owner, const char *name);
-
- # define POOL_INIT id _pool = [[NSAutoreleasePool alloc] init];
- # define POOL_RELEASE [_pool release];
-
- # define ROOT_OBJECT NSObject
- # define FREE_OBJECT(o) [(o) release]
-
- #else // NEXTSTEP
-
- #import <objc/Object.h>
- #import <defaults/defaults.h>
-
- # define POOL_INIT
- # define POOL_RELEASE
-
- # define ROOT_OBJECT Object
- # define FREE_OBJECT(0) [(o) free]
-
- #endif
-