I'm just not sure if "#define _GNU_SOURCE" is the preferred way to go.


Index: xenomai/include/asm-sim/system.h
===================================================================
--- xenomai.orig/include/asm-sim/system.h
+++ xenomai/include/asm-sim/system.h
@@ -24,6 +24,7 @@
 
 #include <asm/param.h>
 #include <errno.h>
+#define _GNU_SOURCE
 #include <string.h>
 #include <malloc.h>
 #include <stdlib.h>
@@ -172,7 +173,7 @@ static inline unsigned long long xnarch_
 
 static inline unsigned long ffnz (unsigned long word)
 {
-    return ffs((int)word) - 1;
+    return ffsl(word) - 1;
 }
 
 #define xnarch_stack_size(tcb)    0
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ xenomai/ChangeLog
@@ -5,6 +5,8 @@
 
        * include/nucleus/system.h: Remove unused (and bogus) ffnz wrapper.
 
+       * include/asm-sim/system.h: Fix ffnz for 64-bit hosts.
+
 2007-04-19  Philippe Gerum  <[EMAIL PROTECTED]>
 
        * ksrc/skins/vrtx/module.c, ksrc/nucleus/pipe.c,

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to