File indexing completed on 2025-02-23 04:27:36
0001 /**************************************************************************************** 0002 * Copyright (c) 2004 David Hammerton <crazney@crazney.net> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #ifndef _PORTABILITY_H 0018 #define _PORTABILITY_H 0019 0020 #if !defined(WIN32) /* POSIX */ 0021 0022 #define SYSTEM_POSIX 0023 0024 #include <sys/types.h> 0025 0026 #if !defined(HAVE_U_INT64_T) && defined(HAVE_UINT64_T) 0027 typedef uint64_t u_int64_t; 0028 #endif 0029 #if !defined(HAVE_U_INT32_T) && defined(HAVE_UINT32_T) 0030 typedef uint32_t u_int32_t; 0031 #endif 0032 #if !defined(HAVE_U_INT16_T) && defined(HAVE_UINT16_T) 0033 typedef uint16_t u_int16_t; 0034 #endif 0035 #if !defined(HAVE_U_INT8_T) && defined(HAVE_UINT8_T) 0036 typedef uint8_t u_int8_t; 0037 #endif 0038 0039 #else /* WIN32 */ 0040 0041 #define SYSTEM_WIN32 0042 0043 #include <windows.h> 0044 #include <time.h> 0045 typedef INT64 int64_t; 0046 typedef UINT64 u_int64_t; 0047 0048 typedef signed int int32_t; 0049 typedef unsigned int u_int32_t; 0050 0051 typedef signed short int16_t; 0052 typedef unsigned short u_int16_t; 0053 0054 typedef signed char int8_t; 0055 typedef unsigned char u_int8_t; 0056 0057 #endif 0058 0059 #endif /* _PORTABILITY_H */