1  /*
   2   * \brief  Fixed-width integer types for 32-bit architectures
   3   * \author Christian Helmuth
   4   * \author Norman Feske
   5   * \date   2006-05-10
   6   *
   7   * In contrast to most Genode header files, which are only usable for C++,
   8   * this file is a valid C header file because a lot of existing C-based
   9   * software relies on fixed-size integer types. These types, however, are
  10   * platform specific but cannot be derived from the compiler`s built-in
  11   * types. Normally, the platform-dependent part of a C library provides
  12   * these type definitions. This header file provides a single header for
  13   * C and C++ programs that are not using a C library but need fixed-width
  14   * integer types.
  15   *
  16   * All type definition are prefixed with `genode_`. If included as a C++
  17   * header, the types are also defined within the `Genode` namespace.
  18   */

  19  
  20  /*
  21   * Copyright (C) 2006-2013 Genode Labs GmbH
  22   *
  23   * This file is part of the Genode OS framework, which is distributed
  24   * under the terms of the GNU General Public License version 2.
  25   */

  26  
  27  #ifndef _INCLUDE__32BIT__BASE__FIXED_STDINT_H_
  28  #define _INCLUDE__32BIT__BASE__FIXED_STDINT_H_
  29  
  30  
  31  /**********************************************************
  32   ** Fixed-size types usable from both C and C++ programs **
  33   **********************************************************/

  34  
  35  typedef signed char        genode_int8_t;
  36  typedef unsigned char      genode_uint8_t;
  37  typedef signed short       genode_int16_t;
  38  typedef unsigned short     genode_uint16_t;
  39  typedef signed             genode_int32_t;
  40  typedef unsigned           genode_uint32_t;
  41  typedef signed long long   genode_int64_t;
  42  typedef unsigned long long genode_uint64_t;
  43  
  44  
  45  /**************************************************
  46   ** Types residing within Genode`s C++ namespace **
  47   **************************************************/

  48  
  49  #ifdef __cplusplus
  50  namespace Genode {
  51     typedef genode_int8_t     int8_t;
  52     typedef genode_uint8_t   uint8_t;
  53     typedef genode_int16_t   int16_t;
  54     typedef genode_uint16_t uint16_t;
  55     typedef genode_int32_t   int32_t;
  56     typedef genode_uint32_t uint32_t;
  57     typedef genode_int64_t   int64_t;
  58     typedef genode_uint64_t uint64_t;
  59  }

  60  #endif
  61  
  62  #endif /* _INCLUDE__32BIT__BASE__FIXED_STDINT_H_ */