*** empty log message ***
This commit is contained in:
parent
fc82972112
commit
2959744ac8
@ -28,9 +28,33 @@
|
||||
/* sizeof (long long) */
|
||||
#define SIZEOF_LONG_LONG 0
|
||||
|
||||
/* sizeof (__int8) */
|
||||
#define SIZEOF___INT8 0
|
||||
|
||||
/* sizeof (__int16) */
|
||||
#define SIZEOF___INT16 0
|
||||
|
||||
/* sizeof (__int32) */
|
||||
#define SIZEOF___INT32 0
|
||||
|
||||
/* sizeof (__int64) */
|
||||
#define SIZEOF___INT64 0
|
||||
|
||||
/* sizeof (__int128) */
|
||||
#define SIZEOF___INT128 0
|
||||
|
||||
/* sizeof (void*) */
|
||||
#define SIZEOF_VOID_P 0
|
||||
|
||||
/* sizeof (float) */
|
||||
#define SIZEOF_FLOAT 0
|
||||
|
||||
/* sizeof (double) */
|
||||
#define SIZEOF_DOUBLE 0
|
||||
|
||||
/* sizeof (long double) */
|
||||
#define SIZEOF_LONG_DOUBLE 0
|
||||
|
||||
/* fcntl.h */
|
||||
#undef XP_HAVE_FCNTL_H
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
AC_PREREQ(2.53)
|
||||
AC_INIT([xpkit], [deb-0.1.0])
|
||||
AC_REVISION([$Revision: 1.19 $])
|
||||
AC_REVISION([$Revision: 1.20 $])
|
||||
AC_CONFIG_HEADER([xp/config.h])
|
||||
|
||||
# Checks for programs.
|
||||
@ -28,10 +28,6 @@ AC_C_BIGENDIAN(
|
||||
# Checks for data types
|
||||
AC_CHECK_TYPE(long long, [AC_DEFINE([XP_HAVE_LONG_LONG],[],[long long])])
|
||||
AC_CHECK_TYPE(long double, [AC_DEFINE([XP_HAVE_LONG_DOUBLE],[],[long double])])
|
||||
AC_CHECK_TYPE(__int8, [AC_DEFINE([XP_HAVE_INT8],[],[__int8])])
|
||||
AC_CHECK_TYPE(__int16, [AC_DEFINE([XP_HAVE_INT16],[],[__int16])])
|
||||
AC_CHECK_TYPE(__int32, [AC_DEFINE([XP_HAVE_INT32],[],[__int32])])
|
||||
AC_CHECK_TYPE(__int64, [AC_DEFINE([XP_HAVE_INT64],[],[__int64])])
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
@ -42,10 +38,11 @@ AC_CHECK_SIZEOF(__int8)
|
||||
AC_CHECK_SIZEOF(__int16)
|
||||
AC_CHECK_SIZEOF(__int32)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
AC_CHECK_SIZEOF(__int128)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(float)
|
||||
AC_CHECK_SIZEOF(double)
|
||||
AC_CHECK_SIZEOF(long double)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
|
||||
# Checks for library functions.
|
||||
#AC_FUNC_MEMCMP
|
||||
@ -56,7 +53,7 @@ AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_FILE([/NextDeveloper],[AC_DEFINE([_POSIX_SOURCE],[],[_POSIX_SOURCE])])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile build/Makefile xp/Makefile xp/bin/ctype/Makefile
|
||||
Makefile xp/Makefile xp/bin/ctype/Makefile
|
||||
xp/c/Makefile xp/lisp/Makefile
|
||||
xp/test/c/Makefile xp/test/lisp/Makefile])
|
||||
AC_OUTPUT
|
||||
|
106
ase/types.h
106
ase/types.h
@ -1,26 +1,18 @@
|
||||
/*
|
||||
* $Id: types.h,v 1.13 2005-02-13 16:15:31 bacon Exp $
|
||||
* $Id: types.h,v 1.14 2005-02-14 03:13:32 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _XP_TYPES_H_
|
||||
#define _XP_TYPES_H_
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <xp/config.h>
|
||||
#endif
|
||||
#include <xp/xp_types.h>
|
||||
|
||||
#if defined(XP_HAVE_LONG_LONG)
|
||||
typedef long long xp_long_t;
|
||||
typedef unsigned long long xp_ulong_t;
|
||||
#elif defined(XP_HAVE___INT64)
|
||||
typedef __int64 xp_long_t;
|
||||
typedef unsigned __int64 xp_ulong_t;
|
||||
#else
|
||||
typedef long xp_long_t;
|
||||
typedef unsigned long xp_ulong_t;
|
||||
#endif
|
||||
/* boolean types */
|
||||
typedef int xp_bool_t;
|
||||
#define xp_true (0 == 0)
|
||||
#define xp_false (0 != 0)
|
||||
|
||||
/* integer that can hold a pointer */
|
||||
#if SIZEOF_VOID_P == SIZEOF_LONG_LONG
|
||||
typedef long long xp_int_t;
|
||||
typedef unsigned long long xp_uint_t;
|
||||
@ -32,42 +24,100 @@ typedef int xp_int_t;
|
||||
typedef unsigned int xp_uint_t;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_CHAR == 8
|
||||
/* the largest integer supported by the system */
|
||||
#if SIZEOF_LONG_LONG != 0
|
||||
typedef long long xp_long_t;
|
||||
typedef unsigned long long xp_ulong_t;
|
||||
#elif SIZEOF___INT64 != 0
|
||||
typedef __int64 xp_long_t;
|
||||
typedef unsigned __int64 xp_ulong_t;
|
||||
#else
|
||||
typedef long xp_long_t;
|
||||
typedef unsigned long xp_ulong_t;
|
||||
#endif
|
||||
|
||||
/* integers of specific size */
|
||||
#if SIZEOF_CHAR == 1
|
||||
typedef char xp_int8_t;
|
||||
typedef unsigned char xp_uint8_t;
|
||||
#elif SIZEOF___INT8 == 1
|
||||
typedef __int8 xp_int8_t;
|
||||
typedef unsigned __int8 xp_uint8_t;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_SHORT == 16
|
||||
#if SIZEOF_SHORT == 2
|
||||
typedef short xp_int16_t;
|
||||
typedef unsigned short xp_uint16_t;
|
||||
#elif SIZEOF___INT16 == 2
|
||||
typedef __int16 xp_int16_t;
|
||||
typedef unsigned __int16 xp_uint16_t;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT == 32
|
||||
#if SIZEOF_INT == 4
|
||||
typedef int xp_int32_t;
|
||||
typedef unsigned int xp_uint32_t;
|
||||
#elif SIZEOF_LONG == 32
|
||||
#elif SIZEOF_LONG == 4
|
||||
typedef long xp_int32_t;
|
||||
typedef unsigned long xp_uint32_t;
|
||||
#elif SIZEOF___INT32 == 4
|
||||
typedef __int32 xp_int32_t;
|
||||
typedef unsigned __int32 xp_uint32_t;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT = 64
|
||||
#if SIZEOF_INT == 8
|
||||
typedef int xp_int64_t;
|
||||
typedef unsigned int xp_uint64_t;
|
||||
#elif SIZEOF_LONG == 64
|
||||
#elif SIZEOF_LONG == 8
|
||||
typedef long xp_int64_t;
|
||||
typedef unsigned long xp_uint64_t;
|
||||
#elif SIZEOF_LONG_LONG == 64
|
||||
#elif SIZEOF_LONG_LONG == 8
|
||||
typedef long long xp_int64_t;
|
||||
typedef unsigned long long xp_uint64_t;
|
||||
#elif SIZEOF___INT64 == 8
|
||||
typedef __int64 xp_int64_t;
|
||||
typedef unsigned __int64 xp_uint64_t;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT == 16
|
||||
typedef int xp_int128_t;
|
||||
typedef unsigned int xp_uint128_t;
|
||||
#elif SIZEOF_LONG == 16
|
||||
typedef long xp_int128_t;
|
||||
typedef unsigned long xp_uint128_t;
|
||||
#elif SIZEOF_LONG_LONG == 16
|
||||
typedef long long xp_int128_t;
|
||||
typedef unsigned long long xp_uint128_t;
|
||||
#elif SIZEOF___INT128 == 16
|
||||
typedef __int128 xp_int128_t;
|
||||
typedef unsigned __int128 xp_uint128_t;
|
||||
#endif
|
||||
|
||||
/* miscellaneous integral types */
|
||||
typedef xp_uint8_t xp_byte_t;
|
||||
typedef xp_uint_t xp_size_t;
|
||||
typedef xp_int_t xp_ssize_t;
|
||||
|
||||
typedef int xp_bool_t;
|
||||
#define xp_true (0 == 0)
|
||||
#define xp_false (0 != 0)
|
||||
/* floating-point number */
|
||||
#if SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE
|
||||
typedef long double xp_real_t;
|
||||
#else
|
||||
typedef double xp_real_t;
|
||||
#endif
|
||||
|
||||
/* character types */
|
||||
typedef char xp_mchar_t;
|
||||
typedef int xp_mcint_t;
|
||||
|
||||
#if SIZEOF_LONG == 4
|
||||
/*typedef unsigned short xp_wchar_t;*/
|
||||
typedef long xp_wchar_t;
|
||||
typedef long xp_wcint_t;
|
||||
#else
|
||||
/*typedef unsigned short xp_wchar_t;*/
|
||||
typedef int xp_wchar_t;
|
||||
typedef int xp_wcint_t;
|
||||
#endif
|
||||
|
||||
#ifdef XP_HAVE_WCHAR_T
|
||||
// TODO: make it configurable from outside
|
||||
/*
|
||||
#define XP_CHAR_IS_MCHAR
|
||||
@ -79,10 +129,4 @@ typedef xp_mcint_t xp_cint_t;
|
||||
typedef xp_wchar_t xp_char_t;
|
||||
typedef xp_wcint_t xp_cint_t;
|
||||
|
||||
#else
|
||||
#define XP_CHAR_IS_MCHAR
|
||||
typedef xp_mchar_t xp_char_t;
|
||||
typedef xp_mcint_t xp_cint_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user