File: hstdint.h

package info (click to toggle)
hercules 3.05-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,520 kB
  • ctags: 16,438
  • sloc: ansic: 147,777; sh: 8,775; makefile: 737; perl: 202; sed: 16
file content (48 lines) | stat: -rw-r--r-- 1,779 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* HSTDINT.H    (c)Copyright Roger Bowler, 2007                      */
/*              Hercules standard integer definitions                */

// $Id: hstdint.h,v 1.2 2007/06/23 00:04:11 ivan Exp $
//
// $Log: hstdint.h,v $
// Revision 1.2  2007/06/23 00:04:11  ivan
// Update copyright notices to include current year (2007)
//
// Revision 1.1  2006/12/10 23:18:32  rbowler
// Modify decContext.h to include hstdint.h instead of stdint.h
//
//

/*-------------------------------------------------------------------*/
/* The purpose of this file is to define the following typedefs:     */
/*      uint8_t, uint16_t, uint32_t, uint64_t                        */
/*      int8_t, int16_t, int32_t, int64_t                            */
/* For Windows, the MSVC-specific C sized integer types are used.    */
/* For Unix, definitions are included from stdint.h if it exists,    */
/* otherwise from inttypes.h (if it exists), otherwise unistd.h      */
/*-------------------------------------------------------------------*/

#ifndef _HSTDINT_H
#define _HSTDINT_H

#ifdef HAVE_CONFIG_H
  #include <config.h>           /* Hercules build configuration      */
#endif

#if defined(_MSVC_)
  typedef unsigned __int8  uint8_t;
  typedef unsigned __int16 uint16_t;
  typedef unsigned __int32 uint32_t;
  typedef unsigned __int64 uint64_t;
  typedef signed __int8  int8_t;
  typedef signed __int16 int16_t;
  typedef signed __int32 int32_t;
  typedef signed __int64 int64_t;
#elif defined(HAVE_STDINT_H)
  #include <stdint.h>           /* Standard integer definitions      */
#elif defined(HAVE_INTTYPES_H)
  #include <inttypes.h>         /* Fixed size integral types         */
#else
  #include <unistd.h>           /* Unix standard definitions         */
#endif

#endif /*_HSTDINT_H*/