[PATCH] Persuade yadex to work on amd64

  • From: Darren Salt <linux@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
  • To: yadex@xxxxxxxxxxxxx
  • Date: Sun, 18 Jun 2006 15:45:29 +0100

The attached patch allows yadex to work on amd64 and possibly other 64-bit
architectures. yadex expects 32-bit long ints and if it doesn't get them, it
complains and exits.

-- 
| Darren Salt    | linux or ds at              | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Travel less. Share transport more.           PRODUCE LESS CARBON DIOXIDE.

You don't usually see that kind of behaviour in a major appliance.
diff -urNad yadex-1.7.0~/src/yadex.h yadex-1.7.0/src/yadex.h
--- yadex-1.7.0~/src/yadex.h    2006-06-18 15:39:01.000000000 +0100
+++ yadex-1.7.0/src/yadex.h     2006-06-18 15:39:19.183431250 +0100
@@ -85,26 +85,30 @@
 
 
 /*
- *     Platform-independant types and formats.
+ *     Platform-independent types and formats.
  */
-typedef unsigned char  u8;
-typedef signed   char  i8;
+#ifdef _STDINT_H
+#warning stdint.h already included
+#endif
+#include <stdint.h>
+typedef uint8_t  u8;
+typedef int8_t   i8;
 
-typedef unsigned short u16;
+typedef uint16_t u16;
 #define F_U16_D "hu"
 #define F_U16_H "hX"
 
-typedef signed   short i16;
+typedef int16_t  i16;
 #define F_I16_D "hd"
 #define F_I16_H "hX"
 
-typedef unsigned long  u32;
-#define F_U32_D "lu"
-#define F_U32_H "lX"
+typedef uint32_t u32;
+#define F_U32_D "u"
+#define F_U32_H "X"
 
-typedef signed   long  i32;
-#define F_I32_D "ld"
-#define F_I32_H "lX"
+typedef int32_t  i32;
+#define F_I32_D "d"
+#define F_I32_H "X"
 
 
 /*

Other related posts:

  • » [PATCH] Persuade yadex to work on amd64