home: hub: 9ficl

Download patch

ref: 47efe023d57e8c96807a68b050bac4dc56c7830a
parent: 7f9d4b6b1756a549056dfcb9b3763c23a4cf3789
author: asau <asau@ficl.sf.net>
date: Fri Sep 10 05:34:37 CDT 2010

Use fixed width integer types.
Use intptr_t for generic integer type.

--- a/ficlplatform/ansi.h
+++ b/ficlplatform/ansi.h
@@ -1,12 +1,12 @@
-typedef char ficlInteger8;
-typedef unsigned char ficlUnsigned8;
-typedef short ficlInteger16;
-typedef unsigned short ficlUnsigned16;
-typedef long ficlInteger32;
-typedef unsigned long ficlUnsigned32;
+typedef int8_t ficlInteger8;
+typedef uint8_t ficlUnsigned8;
+typedef int16_t ficlInteger16;
+typedef uint16_t ficlUnsigned16;
+typedef int32_t ficlInteger32;
+typedef uint32_t ficlUnsigned32;
 
-typedef ficlInteger32 ficlInteger;
-typedef ficlUnsigned32 ficlUnsigned;
+typedef intptr_t ficlInteger;
+typedef uintptr_t ficlUnsigned;
 typedef float ficlFloat;
 
 #define FICL_PLATFORM_BASIC_TYPES   (1)
--- a/ficlplatform/unix.h
+++ b/ficlplatform/unix.h
@@ -13,18 +13,20 @@
 #define FICL_PLATFORM_HAS_FTRUNCATE   (1)
 #define FICL_PLATFORM_HAS_2INTEGER    (1)
 
-typedef char ficlInteger8;
-typedef unsigned char ficlUnsigned8;
-typedef short ficlInteger16;
-typedef unsigned short ficlUnsigned16;
-typedef long ficlInteger32;
-typedef unsigned long ficlUnsigned32;
-typedef long long ficlInteger64;
-typedef unsigned long long ficlUnsigned64;
+typedef int8_t ficlInteger8;
+typedef uint8_t ficlUnsigned8;
+typedef int16_t ficlInteger16;
+typedef uint16_t ficlUnsigned16;
+typedef int32_t ficlInteger32;
+typedef uint32_t ficlUnsigned32;
+typedef int64_t ficlInteger64;
+typedef uint64_t ficlUnsigned64;
 
-typedef ficlInteger32 ficlInteger;
-typedef ficlUnsigned32 ficlUnsigned;
+typedef intptr_t ficlInteger;
+typedef uintptr_t ficlUnsigned;
 typedef float ficlFloat;
 
+#if defined(FICL_PLATFORM_HAS_2INTEGER) && FICL_PLATFORM_HAS_2INTEGER
 typedef ficlInteger64 ficl2Integer;
 typedef ficlUnsigned64 ficl2Unsigned;
+#endif