home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / smstd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-24  |  3.0 KB  |  137 lines

  1. /*
  2.  *   COMPONENT_NAME: somc
  3.  *
  4.  *   ORIGINS: 27
  5.  *
  6.  *
  7.  *   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  8.  *   All Rights Reserved
  9.  *   Licensed Materials - Property of IBM
  10.  *   US Government Users Restricted Rights - Use, duplication or
  11.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12.  */
  13. /* %Z% %I% %W% %G% %U% [%H% %T%] */
  14.  
  15. /*
  16.  */
  17.  
  18. /*
  19.  *         File:    smstd.h.
  20.  *     Contents:    Standard header file with some useful #includes
  21.  *                  and macros for all compiler/emitter development.
  22.  */
  23.  
  24. #ifndef smstd_h
  25. #define smstd_h
  26.  
  27. #ifdef __cplusplus      /* Turn off inlining of strcmp, etc for C++ */
  28. #undef __STR__
  29. #endif
  30.  
  31. #include <stdio.h>
  32. #include <string.h>
  33. #include <sys/types.h>
  34. #include <stdlib.h>
  35.  
  36. #ifndef __SCLITE__
  37.     #if defined (__STDC__) || defined (__EXTENDED__)
  38.     #if defined (__OS2__) || defined (__WINDOWS__)   /* 11494 */
  39.         #include <io.h>
  40.     #else
  41.         #include <unistd.h>
  42.     #endif
  43.     #else
  44.     #define _NO_PROTO
  45.     #endif
  46. #endif
  47.  
  48. #ifndef TRUE
  49.     #define TRUE 1
  50. #endif
  51. #ifndef FALSE
  52.     #define FALSE 0
  53. #endif
  54.  
  55. /*
  56.  *  Standard typedefs:
  57.  */
  58. typedef int bool;
  59.  
  60. #if !defined(WIN32_DLLIMPORT)
  61.   #if (defined(_WIN32) && !defined(_WIN32_SOMC))
  62.     #if (_MSC_VER >= 900)
  63.       #define WIN32_DLLIMPORT __declspec(dllimport)
  64.     #elif (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__WINDOWS__)
  65.       /* IBM compiler defines */
  66.       #define WIN32_DLLIMPORT __declspec(dllimport)
  67.     #endif
  68.   #else
  69.     #define WIN32_DLLIMPORT /* Maps onto nothing by default */
  70.   #endif
  71. #endif
  72.  
  73. #define global /* Maps onto nothing, used as a prefix to global variables */
  74.  
  75. /*
  76.  *  Standard NULL casts:
  77.  */
  78. #ifndef NULL
  79. #define NULL   0
  80. #endif
  81. #define CNULL       ((char *)0)
  82. #define FNULL       ((FILE *)0)
  83. #define VNULL       ((void *)0)
  84. #define INULL       ((int  *)0)
  85. /*
  86.  * from src/somk/somltype.h
  87.  */
  88. #ifndef SOMLINK
  89.   #if defined(_CL386)
  90.     #define SOMLINK _syscall
  91.   #elif defined(applec)
  92.     #define SOMLINK
  93.   #elif defined(__OS2__)
  94.     #if defined(__IBMCPP__) || defined(__IBMC__)
  95.       #define SOMLINK _System
  96.     #elif defined(__BCPLUSPLUS__) || (__BORLANDC__)
  97.       #define SOMLINK _syscall
  98.     #elif defined(__SOMLPRAGMA__)
  99.       #define SOMLINK
  100.     #elif defined(_SOL_PPC)
  101.       #define SOMLINK
  102.     #else
  103.       #define SOMLINK _System
  104.     #endif
  105.   #elif defined(__WINDOWS__)   /* 11494 */
  106.     #define SOMLINK __stdcall
  107.   #elif defined(_MSDOS) || defined(__MSDOS__) || defined(__SC__)
  108.     #if defined(_WDOS) || defined(__SOMEMIT__)
  109.       #ifdef __SC__
  110.     #define SOMLINK
  111.       #endif
  112.     #else
  113.       #define SOMLINK __loadds
  114.       #define WIN16_SOMLINK __loadds
  115.       #ifndef _WIN16
  116.     #define _WIN16
  117.       #endif
  118.     #endif
  119.   #else
  120.     #define SOMLINK
  121.   #endif
  122. #endif
  123.  
  124. #ifndef SOMLINK
  125.   #ifdef __IBMCPP__
  126.     #define SOMLINK _System
  127.   #else
  128.     #ifdef _CL386
  129.       #define SOMLINK _syscall
  130.     #else
  131.       #define SOMLINK
  132.     #endif
  133.   #endif
  134. #endif
  135.  
  136. #endif /* smstd_h */
  137.