[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 1/2] bsdtypes.h: LONG_BITS == 64 ist fuer i386 falsch



! bsdtypes.h: LONG_BITS je nach Architektur unterschiedlich setzen. Damit tut
  dann sogar strcspn wie erwartet.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/include/bsdtypes.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/include/bsdtypes.h b/src/include/bsdtypes.h
index 7d7dc5a..fcfc141 100644
--- a/src/include/bsdtypes.h
+++ b/src/include/bsdtypes.h
@@ -30,6 +30,7 @@
 #define _BSDTYPES_H_
 
 #include <stddef.h>
+#include <lost/config.h>
 
 typedef unsigned char u_char;
 typedef unsigned int u_short;
@@ -38,7 +39,12 @@ typedef unsigned long u_long;
 
 typedef void* caddr_t;
 
+#if CONFIG_ARCH == ARCH_AMD64
 #define LONG_BIT 64
+#else
+#define LONG_BIT 32
+#endif
+
 #define NBBY 8
 
 #endif
-- 
1.5.6.5