platform_defs.h | platform_defs.h | |||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
#include <stdarg.h> | #include <stdarg.h> | |||
#include <assert.h> | #include <assert.h> | |||
#include <stddef.h> | #include <stddef.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <string.h> | #include <string.h> | |||
#include <stdint.h> | #include <stdint.h> | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <ctype.h> | #include <ctype.h> | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include <limits.h> | ||||
#define HAVE___U32 1 | #define HAVE___U32 1 | |||
#ifdef HAVE___U32 | #ifdef HAVE___U32 | |||
#include <asm/types.h> | #include <asm/types.h> | |||
#else | #else | |||
typedef unsigned char __u8; | typedef unsigned char __u8; | |||
typedef signed char __s8; | typedef signed char __s8; | |||
typedef unsigned short __u16; | typedef unsigned short __u16; | |||
typedef signed short __s16; | typedef signed short __s16; | |||
typedef unsigned int __u32; | typedef unsigned int __u32; | |||
skipping to change at line 81 | skipping to change at line 82 | |||
#include <xfs/gnukfreebsd.h> | #include <xfs/gnukfreebsd.h> | |||
#elif defined(__APPLE__) | #elif defined(__APPLE__) | |||
#include <xfs/darwin.h> | #include <xfs/darwin.h> | |||
#elif defined(__sgi__) || defined(__sgi) | #elif defined(__sgi__) || defined(__sgi) | |||
#include <xfs/irix.h> | #include <xfs/irix.h> | |||
#else | #else | |||
# error unknown platform... have fun porting! | # error unknown platform... have fun porting! | |||
#endif | #endif | |||
/* long and pointer must be either 32 bit or 64 bit */ | /* long and pointer must be either 32 bit or 64 bit */ | |||
#define HAVE_32BIT_LONG 1 | #define SIZEOF_LONG 4 | |||
/* #undef HAVE_64BIT_LONG */ | #define SIZEOF_CHAR_P 4 | |||
#define HAVE_32BIT_PTR 1 | #define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT) | |||
/* #undef HAVE_64BIT_PTR */ | ||||
#if defined(HAVE_32BIT_LONG) | ||||
# define BITS_PER_LONG 32 | ||||
#elif defined(HAVE_64BIT_LONG) | ||||
# define BITS_PER_LONG 64 | ||||
#else | ||||
# error Unknown long size | ||||
#endif | ||||
/* Check if __psint_t is set to something meaningful */ | /* Check if __psint_t is set to something meaningful */ | |||
/* #undef HAVE___PSINT_T */ | /* #undef HAVE___PSINT_T */ | |||
#ifndef HAVE___PSINT_T | #ifndef HAVE___PSINT_T | |||
# ifdef HAVE_32BIT_PTR | # if (SIZEOF_CHAR_P * CHAR_BIT) == 32 | |||
typedef int __psint_t; | typedef int __psint_t; | |||
# elif defined HAVE_64BIT_PTR | # elif (SIZEOF_CHAR_P * CHAR_BIT) == 64 | |||
# ifdef HAVE_64BIT_LONG | # if BITS_PER_LONG == 64 | |||
typedef long __psint_t; | typedef long __psint_t; | |||
# else | # else | |||
/* This is a very strange architecture, which has 64 bit pointers but */ | /* This is a very strange architecture, which has 64 bit pointers but */ | |||
/* not 64 bit longs. So, just punt here and assume long long is OK. */ | /* not 64 bit longs. So, just punt here and assume long long is OK. */ | |||
typedef long long __psint_t; | typedef long long __psint_t; | |||
# endif | # endif | |||
# else | # else | |||
# error Unknown pointer size | # error Unknown pointer size | |||
# endif | # endif | |||
#endif | #endif | |||
/* Check if __psunsigned_t is set to something meaningful */ | /* Check if __psunsigned_t is set to something meaningful */ | |||
/* #undef HAVE___PSUNSIGNED_T */ | /* #undef HAVE___PSUNSIGNED_T */ | |||
#ifndef HAVE___PSUNSIGNED_T | #ifndef HAVE___PSUNSIGNED_T | |||
# ifdef HAVE_32BIT_PTR | # if (SIZEOF_CHAR_P * CHAR_BIT) == 32 | |||
typedef unsigned int __psunsigned_t; | typedef unsigned int __psunsigned_t; | |||
# elif defined HAVE_64BIT_PTR | # elif (SIZEOF_CHAR_P * CHAR_BIT) == 64 | |||
# ifdef HAVE_64BIT_LONG | # if BITS_PER_LONG == 64 | |||
typedef long __psunsigned_t; | typedef long __psunsigned_t; | |||
# else | # else | |||
/* This is a very strange architecture, which has 64 bit pointers but */ | /* This is a very strange architecture, which has 64 bit pointers but */ | |||
/* not 64 bit longs. So, just punt here and assume long long is OK. */ | /* not 64 bit longs. So, just punt here and assume long long is OK. */ | |||
typedef unsigned long long __psunsigned_t; | typedef unsigned long long __psunsigned_t; | |||
# endif | # endif | |||
# else | # else | |||
# error Unknown pointer size | # error Unknown pointer size | |||
# endif | # endif | |||
#endif | #endif | |||
End of changes. 6 change blocks. | ||||
18 lines changed or deleted | 10 lines changed or added | |||