bitypes.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * bitypes.h,v 1.4 1995/08/24 01:58:54 hjl Exp
  3. */
  4. /*
  5. * ++Copyright++ 1993
  6. * -
  7. * Copyright (c) 1993 Regents of the University of California.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. * 3. All advertising materials mentioning features or use of this software
  19. * must display the following acknowledgement:
  20. * This product includes software developed by the University of
  21. * California, Berkeley and its contributors.
  22. * 4. Neither the name of the University nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  27. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  32. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  33. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  34. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  35. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  36. * SUCH DAMAGE.
  37. * -
  38. * Portions Copyright (c) 1993 by Digital Equipment Corporation.
  39. *
  40. * Permission to use, copy, modify, and distribute this software for any
  41. * purpose with or without fee is hereby granted, provided that the above
  42. * copyright notice and this permission notice appear in all copies, and that
  43. * the name of Digital Equipment Corporation not be used in advertising or
  44. * publicity pertaining to distribution of the document or software without
  45. * specific, written prior permission.
  46. *
  47. * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  48. * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  49. * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
  50. * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  51. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  52. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  53. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  54. * SOFTWARE.
  55. * -
  56. * --Copyright--
  57. */
  58. /*
  59. #ifdef __USE_BSD
  60. */
  61. /*
  62. #ifndef __BIT_TYPES_DEFINED__
  63. # if (defined(BSD) && (BSD >= 199306)) || \
  64. (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199312))
  65. # define __BIT_TYPES_DEFINED__
  66. # endif
  67. #endif
  68. */
  69. #ifndef __BIT_TYPES_DEFINED__
  70. #define __BIT_TYPES_DEFINED__
  71. /*
  72. * Basic integral types. Omit the typedef if
  73. * not possible for a machine/compiler combination.
  74. */
  75. typedef /*signed*/ char int8_t;
  76. typedef unsigned char u_int8_t;
  77. typedef short int16_t;
  78. typedef unsigned short u_int16_t;
  79. typedef int int32_t;
  80. typedef unsigned int u_int32_t;
  81. #if 0
  82. # if __GNUC__ >= 2 && !defined(__STRICT_ANSI__)
  83. typedef long long int64_t;
  84. typedef unsigned long long u_int64_t;
  85. # endif
  86. #endif
  87. #endif /* __BIT_TYPES_DEFINED__ */
  88. /* #endif __USE_BSD */