diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-23T22·14+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-23T22·14+0000 |
commit | 0efc986ba1c0de97fd0bdb97db2ca6b7a77ee7d4 (patch) | |
tree | 248c2258db05d6c2566e91c27a467b361a837924 /externals/sizeof.patch | |
parent | b4e6d98fc33df055c8230903bb7d9633042a6374 (diff) | |
parent | 7db2831d3a76bc239bb7a9f7573152ce12413c29 (diff) |
* Sync with the trunk.
Diffstat (limited to 'externals/sizeof.patch')
-rw-r--r-- | externals/sizeof.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/externals/sizeof.patch b/externals/sizeof.patch new file mode 100644 index 000000000000..2649cc564913 --- /dev/null +++ b/externals/sizeof.patch @@ -0,0 +1,56 @@ +diff -rc -x '*~' aterm-2.5-orig/aterm/aterm.c aterm-2.5/aterm/aterm.c +*** aterm-2.5-orig/aterm/aterm.c 2007-02-27 23:41:31.000000000 +0100 +--- aterm-2.5/aterm/aterm.c 2010-02-23 15:10:38.000000000 +0100 +*************** +*** 150,155 **** +--- 150,157 ---- + if (initialized) + return; + ++ assert(sizeof(long) == sizeof(void *)); ++ + /*{{{ Handle arguments */ + + for (lcv=1; lcv < argc; lcv++) { +diff -rc -x '*~' aterm-2.5-orig/aterm/encoding.h aterm-2.5/aterm/encoding.h +*** aterm-2.5-orig/aterm/encoding.h 2007-02-27 23:41:31.000000000 +0100 +--- aterm-2.5/aterm/encoding.h 2010-02-23 15:36:05.000000000 +0100 +*************** +*** 10,24 **** + { + #endif/* __cplusplus */ + +! #if SIZEOF_LONG > 4 +! #define AT_64BIT + #endif + +! #if SIZEOF_LONG != SIZEOF_VOID_P +! #error Size of long is not the same as the size of a pointer + #endif + +! #if SIZEOF_INT > 4 + #error Size of int is not 32 bits + #endif + +--- 10,30 ---- + { + #endif/* __cplusplus */ + +! #include <limits.h> +! +! #ifndef SIZEOF_LONG +! #if ULONG_MAX > 4294967295 +! #define SIZEOF_LONG 8 +! #else +! #define SIZEOF_LONG 4 +! #endif + #endif + +! #if SIZEOF_LONG > 4 +! #define AT_64BIT + #endif + +! #if UINT_MAX > 4294967295 + #error Size of int is not 32 bits + #endif + |