1/* -*- c -*- 2integrit - file integrity verification system 3Copyright (C) 2006 Ed L. Cashin 4 5This program is free software; you can redistribute it and/or 6modify it under the terms of the GNU General Public License 7as published by the Free Software Foundation; either version 2 8of the License, or (at your option) any later version. 9 10This program is distributed in the hope that it will be useful, 11but WITHOUT ANY WARRANTY; without even the implied warranty of 12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13GNU General Public License for more details. 14 15You should have received a copy of the GNU General Public License 16along with this program; if not, write to the Free Software 17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19*/ 20 21/* all we really need stdint.h to do is define uint8_t and uint32_t, 22 * and since configure probably found that out, we can help out platforms 23 * that aren't up to date with the C99 spec */ 24 25#include <config.h> 26#include <limits.h> 27 28#ifndef ELC_STDINT_H 29#define ELC_STDINT_H 30 31#if CHAR_BIT == 8 32typedef unsigned char uint8_t; 33#else 34#error Unsupported character type 35#endif 36 37#if SIZEOF_UNSIGNED_INT == 4 38typedef unsigned int uint32_t; 39#elif SIZEOF_UNSIGNED_LONG == 4 40typedef unsigned long uint32_t; 41#elif SIZEOF_UNSIGNED_LONG_LONG == 4 42typedef unsigned long long uint32_t; 43#elif SIZEOF_UNSIGNED_SHORT == 4 44typedef unsigned short uint32_t; 45#else 46#error No supported unsigned integer type found 47#endif 48 49#endif /* ELC_STDINT_H */ 50