home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / ibm / common / compiler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-16  |  2.0 KB  |  81 lines

  1. /*
  2.  * $XConsortium: compiler.h,v 1.2 91/07/16 13:04:49 jap Exp $
  3.  *
  4.  * Copyright IBM Corporation 1987,1988,1989,1990,1991
  5.  *
  6.  * All Rights Reserved
  7.  *
  8.  * License to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted,
  10.  * provided that the above copyright notice appear in all copies and that
  11.  * both that copyright notice and this permission notice appear in
  12.  * supporting documentation, and that the name of IBM not be
  13.  * used in advertising or publicity pertaining to distribution of the
  14.  * software without specific, written prior permission.
  15.  *
  16.  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND 
  18.  * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
  19.  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23.  * SOFTWARE.
  24.  *
  25. */
  26.  
  27. #ifndef COMPILER_H
  28. #define COMPILER_H
  29.  
  30. #ifdef _ANSI_DECLS_
  31. #undef _ANSI_DECLS_
  32. #endif
  33.  
  34. #if defined(UNIXCPP) && !defined(ANSICPP)
  35. #define APPEND_STRING(a,b) a/**/b
  36. #else
  37. #if defined(ANSICPP)
  38. #define APPEND_STRING(a,b) a##b
  39. #else
  40. #define APPEND_STRING(a,b) /**/a\
  41. b/**/
  42. #endif
  43. #endif
  44.  
  45. #ifdef SYSV
  46. #define MOVE( src, dst, length ) memcpy( dst, src, length)
  47. #else
  48. #define MOVE( src, dst, length ) bcopy( src, dst, length )
  49. #endif
  50.  
  51. #define MAX(a,b) (((a)>(b))?(a):(b))
  52. #define MIN(a,b) (((a)<(b))?(a):(b))
  53. #define ABS(x) (((x)>0)?(x):-(x))
  54.  
  55. #if !defined(_ANSI_DECLS_) || defined(lint)
  56. /* So that lint doesn't complain about constructs it doesn't understand */
  57. #ifdef volatile
  58. #undef volatile
  59. #endif
  60. #define volatile /**/
  61. #ifdef const
  62. #undef const
  63. #endif
  64. #define const    /**/
  65. #ifdef signed
  66. #undef signed
  67. #endif
  68. #define signed    /**/
  69. #ifdef _ANSI_DECLS_
  70. #undef _ANSI_DECLS_
  71. #endif
  72. #endif
  73.  
  74. #ifdef AIXV3
  75. #if defined(volatile)
  76. #undef volatile
  77. #endif
  78. #endif
  79.  
  80. #endif /* COMPILER_H */
  81.