home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
som30tk.zip
/
som30os2.zip
/
include
/
somplatf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-24
|
5KB
|
155 lines
/*
* @(#) 1.8 src/somk/intelos2/somplatf.h, somk.api, som3.0 9/4/96 13:59:03 [12/24/96 08:23:20]
*/
/*
* 96F8647, 96F8648, 96F8850 (C) Copyright IBM Corp. 1992, 1994
* All Rights Reserved
* Licensed Materials - Property of IBM
*/
/*
* SOMPLATF.H
*
* Plaform-specific portions of the SOM ABI
*
* Interfaces and typedefs described in this header vary across
* platforms.
*
*/
#ifndef somplatf_h
#define somplatf_h
/*
* Class Libraries -- Loading and Class Registration
*
* This section defines the system-dependent library handle that is
* passed as an argument to somRegisterLibraryClasses and the
* userInitTermRoutine. For OS/2, this is an HMODULE (unsigned long);
* for AIX, it is a function pointer (void *) for the main entry point
* of the library.
*/
typedef unsigned long somLibraryHandle;
/*
* This portion was moved from SOMDEFS.H (formerly SOMLTYPE.H)
* Set up the compiler-dependent macro definitions needed by the SOM
* header files. The macro variables defined here are SOMEXTERN,
* SOMLINK, SOMDLINK, SOM_DATASEG_PRAGMAS, SOMLEGACY1, SOMLEGACY2
*
* The SOMEXTERN, SOMLINK, and SOMDLINK variables are used to control
* the register linkage conventions for all SOM functions, methods,
* and external data references.
*
* All SOM functions and external data references are preceded with a
* SOMEXTERN macro (SOM methods do not have external names).
*
* All SOM functions and methods are prototyped with a SOMLINK keyword.
*
* All SOM external data references are defined with a SOMDLINK keyword.
*
* The SOM_DATASEG_PRAGMAS variable controls whether or not
* #pragma data_seg(segname) directives are passed to the compiler.
* This variable is defined only for compilers that recognize and
* implement this pragma. SOM's support for coerced classes makes
* use of this pragma to place certain data definitions in specific
* data segments.
*
* Users may supply (at their own risk) appropriate definitions for
* other compilers using "-DSOMEXTERN=x", "-DSOMLINK=y", "-DSOMDLINK=z",
* or "-DSOM_DATASEG_PRAGMAS" arguments on the compiler's command line.
* Any such definition is not disturbed by the following code.
*
* assumptions:
* (1) __cplusplus is defined when compiling C++ code anywhere
* (2) __IBMCPP__ is defined by CSet/2 on OS/2 when compiling C++ code
* (3) __IBMC__ is defined by CSet/2 on OS/2 when compiling C code
* (4) _CL386 may be defined if not using an IBM compiler
* (5) neither _CL386 nor __IBMCPP__ are defined on AIX
* (6) the SOMLINK keyword has replaced the use of "#pragma Linkage"
* directives in previous releases of SOM
*/
/*
* These definitions are used to select legacy support in
* our source code. When this header file is ported to other
* platforms, consideration should be given to the degree of
* legacy support that is necessary. The file somobj.idl defines
* similar support.
*/
#define SOMLEGACY1 /* support obsolete apsects of SOM 1.0 */
#define SOMLEGACY2 /* support obsolete apsects of SOM 2.0 */
#ifndef SOMEXTERN
#ifdef __cplusplus
#define SOMEXTERN extern "C"
#ifdef __STR__
#undef __STR__
#endif
#else
#define SOMEXTERN extern
#endif
#endif
#ifndef SOMLINK
#if defined(__IBMCPP__) || defined(__IBMC__)
#define SOMLINK _System
#elif defined(__BCPLUSPLUS__) || defined(__BORLANDC__)
#define SOMLINK _syscall
#elif defined(__HIGHC__)
#define SOMLINK _DCC(_DEFAULT_CALLING_CONVENTION & \
~_SHORT_STRUCTS_IN_REGS & ~_OVERLOADED)
#else
#define SOMLINK _System
#endif
#endif
#ifndef SOMDLINK
#define SOMDLINK
#endif
#ifndef SOM_DATASEG_PRAGMAS
#if defined(__IBMC__)
#define SOM_DATASEG_PRAGMAS
#elif defined(__IBMCPP__) && __IBMCPP__ >= 300
#define SOM_DATASEG_PRAGMAS
#elif defined(__HIGHC__)
#define SOM_DATASEG_PRAGMAS
#elif defined(__WATCOMC__)
#define SOM_DATASEG_PRAGMAS
#elif defined(_PPC) && defined(_OS2)
#define SOM_DATASEG_PRAGMAS
#endif
#endif
/*
* The following constant is used in the definition of a default
* method signature within the SOM kernel (somcls.def):
* somMethodInfo defaultMethodInfo = {0, SOM_DEFAULT_VASIZE };
*
* defaultMethodInfo describes all methods that return a scalar,
* take no floating arguments, and use a va_list of no greater than
* SOM_DEFAULT_VASIZE.
*/
/* 21189 */
#ifndef SOM_DEFAULT_VASIZE
#define SOM_DEFAULT_VASIZE 20
#endif
/* Defined for special modifiers needed to import/export
DLL function/variables */
#ifndef SOMDLLIMPORT
#define SOMDLLIMPORT
#endif
#ifndef SOMDLLEXPORT
#define SOMDLLEXPORT
#endif
#endif /* somplatf_h */