home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gdb-4.16-base.tgz / gdb-4.16-base.tar / fsf / gdb / utils / amd-udi / udi / udiphdos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-23  |  4.0 KB  |  119 lines

  1. /******************************************************************************
  2.  * Copyright 1991 Advanced Micro Devices, Inc.
  3.  *
  4.  * This software is the property of Advanced Micro Devices, Inc  (AMD)  which
  5.  * specifically  grants the user the right to modify, use and distribute this
  6.  * software provided this notice is not removed or altered.  All other rights
  7.  * are reserved by AMD.
  8.  *
  9.  * AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
  10.  * SOFTWARE.  IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
  11.  * DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
  12.  * USE OF THIS SOFTWARE.
  13.  *
  14.  * Comments about this software should be directed to udi@amd.com. If access
  15.  * to electronic mail isn't available, send mail to:
  16.  *
  17.  * Advanced Micro Devices, Inc.
  18.  * 29K Support Products
  19.  * Mail Stop 573
  20.  * 5900 E. Ben White Blvd.
  21.  * Austin, TX 78741
  22.  *****************************************************************************
  23.  *       $Id: udiphdos.h,v 1.1 1993/12/23 04:45:12 cassidy Exp $
  24.  *       $Id: @(#)udiphdos.h    2.7, AMD
  25.  */
  26.  
  27.  
  28. /* Modified M.Typaldos 11/92 - Added '386 specific code (just changed
  29.  *               far to _FAR really).
  30.  */
  31.  
  32.  
  33. /* This file is to be used to reconfigure the UDI Procedural interface
  34.    for a given host. This file should be placed so that it will be
  35.    included from udiproc.h. Everything in here may need to be changed
  36.    when you change either the host CPU or its compiler. Nothing in
  37.    here should change to support different targets. There are multiple
  38.    versions of this file, one for each of the different host/compiler
  39.    combinations in use.
  40. */
  41.  
  42. #ifdef DOS386
  43. #ifdef WATC
  44. #define UDIStruct _Packed struct
  45. #define _FAR        
  46. #else /* not WATC */
  47. #define  UDIStruct    _packed struct
  48. #define _FAR    
  49. #define far        /* far not used in DOS386 (but _far is needed) */
  50. #endif /* WATC */
  51. #else
  52. #define _packed        /* _packed only used on DOS386 */
  53. #define  UDIStruct    struct
  54. #define _FAR far
  55. #endif
  56. /* First, we need some types */
  57. /* Types with at least the specified number of bits */
  58. typedef double        UDIReal64;        /* 64-bit real value */
  59. typedef float        UDIReal32;        /* 32-bit real value */
  60.   
  61. typedef unsigned long    UDIUInt32;        /* unsigned integers */
  62. typedef unsigned short    UDIUInt16; 
  63. typedef unsigned char    UDIUInt8;
  64.   
  65. typedef long        UDIInt32;        /* 32-bit integer */ 
  66. typedef short        UDIInt16;        /* 16-bit integer */ 
  67. typedef char        UDIInt8;        /* unreliable signedness */
  68.  
  69. /* To aid in supporting environments where the DFE and TIP use
  70. different compilers or hosts (like DOS 386 on one side, 286 on the
  71. other, or different Unix machines connected by sockets), we define
  72. two abstract types - UDIInt and UDISizeT.
  73. UDIInt should be defined to be int except for host/compiler combinations
  74. that are intended to talk to existing UDI components that have a different
  75. sized int. Similarly for UDISizeT.
  76. */
  77. #ifndef DOS386
  78. typedef int        UDIInt;
  79. typedef unsigned int    UDIUInt;
  80.  
  81. typedef unsigned int    UDISizeT;
  82. #else
  83.     /* DOS386 is one of those host/compiler combinations that require UDIInt
  84.      * not be defined as int
  85.      */
  86. typedef UDIInt16    UDIInt;
  87. typedef UDIUInt16    UDIUInt;
  88.  
  89. typedef UDIUInt16    UDISizeT;
  90. #endif
  91. /* Now two void types. The first is for function return types,
  92. the other for pointers to no particular type. Since these types
  93. are used solely for documentational clarity, if your host/compiler
  94. doesn't support either one, replace them with int and char *
  95. respectively.
  96. */
  97. typedef void        UDIVoid;        /* void type */
  98. typedef void *        UDIVoidPtr;        /* void pointer type */
  99. typedef void _FAR *    UDIHostMemPtr;        /* Arbitrary memory pointer */
  100.  
  101. /* Now we want a type optimized for boolean values. Normally this
  102.    would be int, but on some machines (Z80s, 8051s, etc) it might
  103.    be better to map it onto a char
  104. */
  105. #ifndef DOS386
  106. typedef    int        UDIBool;
  107. #else
  108. typedef    UDIInt16    UDIBool;    /* see reasoning above */
  109. #endif
  110.  
  111. /* Now indicate whether your compiler support full ANSI style
  112.    prototypes. If so, use #if 1. If not use #if 0.
  113. */
  114. #if 1
  115. #define UDIParams(x)    x
  116. #else
  117. #define UDIParams(x)    ()
  118. #endif
  119.