Whamcloud - gitweb
- remove the empty parameters to CDEBUG_STACK to appease ancient gcc that
authorzab <zab>
Fri, 27 Jun 2003 05:36:27 +0000 (05:36 +0000)
committerzab <zab>
Fri, 27 Jun 2003 05:36:27 +0000 (05:36 +0000)
  I was accidentally using.
- we're still #including kernel headers in userspace (sigh), 2.5 needs to
  play along.  It would be great to clean up these includes.

lnet/Kernelenv.in
lnet/include/linux/kp30.h
lnet/libcfs/module.c
lnet/utils/acceptor.c
lustre/portals/Kernelenv.in
lustre/portals/include/linux/kp30.h
lustre/portals/libcfs/module.c
lustre/portals/utils/acceptor.c

index 2e883c5..7a48c58 100644 (file)
@@ -1,5 +1,6 @@
 EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include
-HOSTCFLAGS := $(EXTRA_CFLAGS)
+# portals/utils/debug.c wants <linux/version.h> from userspace.  sigh.
+HOSTCFLAGS := -I@LINUX@/include $(EXTRA_CFLAGS)
 LIBREADLINE := @LIBREADLINE@
 # 2.5's makefiles aren't nice to cross dir libraries in host programs
 PTLCTLOBJS := debug.o l_ioctl.o parser.o portals.o
index bc563fe..1555f78 100644 (file)
@@ -80,9 +80,9 @@ extern unsigned int portal_printk;
 # include <linux/sched.h> /* THREAD_SIZE */
 
 #ifdef  __ia64__
-#define CDEBUG_STACK() ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1))
+#define CDEBUG_STACK ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1))
 #else
-#define CDEBUG_STACK() (THREAD_SIZE -                                      \
+#define CDEBUG_STACK (THREAD_SIZE -                                      \
                         ((unsigned long)__builtin_frame_address(0) &       \
                          (THREAD_SIZE - 1)))
 #endif
@@ -100,19 +100,19 @@ extern unsigned int portal_printk;
         } while (0)
 #else
 #define CHECK_STACK(stack) do{}while(0)
-#define CDEBUG_STACK(var) (0L)
+#define CDEBUG_STACK (0L)
 #endif
 
 #if 1
 #define CDEBUG(mask, format, a...)                                            \
 do {                                                                          \
-        CHECK_STACK(CDEBUG_STACK());                                          \
+        CHECK_STACK(CDEBUG_STACK);                                            \
         if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) ||                      \
             (portal_debug & (mask) &&                                         \
              portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24))))        \
                 portals_debug_msg(DEBUG_SUBSYSTEM, mask,                      \
                                   __FILE__, __FUNCTION__, __LINE__,           \
-                                  CDEBUG_STACK(), format , ## a);             \
+                                  CDEBUG_STACK, format , ## a);               \
 } while (0)
 
 #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
index 342e955..e9f4545 100644 (file)
@@ -65,7 +65,7 @@ struct semaphore nal_cmd_sem;
 void kportal_assertion_failed(char *expr, char *file, const char *func, 
                               const int line)
 {
-        portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(),
+        portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK,
                           "ASSERTION(%s) failed\n", expr);
         LBUG_WITH_LOC(file, func, line);
 }
index c6590db..44fca96 100644 (file)
@@ -11,7 +11,7 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
-#include <asm/byteorder.h>
+#include <asm/byteorder.h> /* sigh.  for __cpu_to_* */
 #include <syslog.h>
 
 #include <errno.h>
index 2e883c5..7a48c58 100644 (file)
@@ -1,5 +1,6 @@
 EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include
-HOSTCFLAGS := $(EXTRA_CFLAGS)
+# portals/utils/debug.c wants <linux/version.h> from userspace.  sigh.
+HOSTCFLAGS := -I@LINUX@/include $(EXTRA_CFLAGS)
 LIBREADLINE := @LIBREADLINE@
 # 2.5's makefiles aren't nice to cross dir libraries in host programs
 PTLCTLOBJS := debug.o l_ioctl.o parser.o portals.o
index bc563fe..1555f78 100644 (file)
@@ -80,9 +80,9 @@ extern unsigned int portal_printk;
 # include <linux/sched.h> /* THREAD_SIZE */
 
 #ifdef  __ia64__
-#define CDEBUG_STACK() ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1))
+#define CDEBUG_STACK ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1))
 #else
-#define CDEBUG_STACK() (THREAD_SIZE -                                      \
+#define CDEBUG_STACK (THREAD_SIZE -                                      \
                         ((unsigned long)__builtin_frame_address(0) &       \
                          (THREAD_SIZE - 1)))
 #endif
@@ -100,19 +100,19 @@ extern unsigned int portal_printk;
         } while (0)
 #else
 #define CHECK_STACK(stack) do{}while(0)
-#define CDEBUG_STACK(var) (0L)
+#define CDEBUG_STACK (0L)
 #endif
 
 #if 1
 #define CDEBUG(mask, format, a...)                                            \
 do {                                                                          \
-        CHECK_STACK(CDEBUG_STACK());                                          \
+        CHECK_STACK(CDEBUG_STACK);                                            \
         if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) ||                      \
             (portal_debug & (mask) &&                                         \
              portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24))))        \
                 portals_debug_msg(DEBUG_SUBSYSTEM, mask,                      \
                                   __FILE__, __FUNCTION__, __LINE__,           \
-                                  CDEBUG_STACK(), format , ## a);             \
+                                  CDEBUG_STACK, format , ## a);               \
 } while (0)
 
 #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
index 342e955..e9f4545 100644 (file)
@@ -65,7 +65,7 @@ struct semaphore nal_cmd_sem;
 void kportal_assertion_failed(char *expr, char *file, const char *func, 
                               const int line)
 {
-        portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(),
+        portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK,
                           "ASSERTION(%s) failed\n", expr);
         LBUG_WITH_LOC(file, func, line);
 }
index c6590db..44fca96 100644 (file)
@@ -11,7 +11,7 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
-#include <asm/byteorder.h>
+#include <asm/byteorder.h> /* sigh.  for __cpu_to_* */
 #include <syslog.h>
 
 #include <errno.h>