I'll see if I can figure out something to do based on Nathan's suggestion.
Looking a little closer today, it looks like maybe there is more of a
compiler difference (or -W flag difference) that determines if you see
the warning, rather than a kernel version?
For example, on RHEL4 (x86_64) I d
Ahh, -Wundef is the difference. That flag is getting set automatically
on my laptop for some reason but not on the other boxes that I try.
-Phil
Phil Carns wrote:
I'll see if I can figure out something to do based on Nathan's suggestion.
Looking a little closer today, it looks like maybe the
We add -Wundef with --enable-strict, but I configured my build with --
enable-strict and didn't see the warning. It looks like the kernel
module code only gets the flags specified when the kernel was built?
Once I added the -Wundef to CFLAGS in my kernel headers Makefile, I
was able to r
Maybe just put something like this in pvfs2-types.h so we have a clean
#define to use in the rest of the code?
#ifdef __KERNEL__
#ifndef BITS_PER_LONG
#error "Cannot determine PVFS2_WORDSIZE"
#endif
#define PVFS2_WORDSIZE BITS_PER_LONG
#else
#ifndef INTPTR_MIN
#e
What about this? It makes pvfs2-sysint.h a bit messier at the top of
the file, but the struct definition is cleaner.
-sam
#if defined(__WORDSIZE)
#define SIZEOF_VOIDP __WORDSIZE
#elif defined(INTPTR_MIN)
#if INTPTR_MIN == INT32_MIN
#define SIZEOF_VOIDP 32
#elif INTPTR_MIN == INT64_MIN
#defi
Except it needs to be like this for the kernel module:
#if defined(__WORDSIZE)
#define SIZEOF_VOIDP __WORDSIZE
#elif defined(BITS_PER_LONG)
#define SIZEOF_VOIDP BITS_PER_LONG
#elif defined(INTPTR_MIN)
#if INTPTR_MIN == INT32_MIN
#define SIZEOF_VOIDP 32
#elif INTPTR_MIN == INT64_MIN
Looks good to me. My only suggestions would be to rename it to
PVFS2_ALIGN_VAR and put it in pvfs2-types.h in case we want to use it
elsewhere. Maybe put PVFS2_ on the SIZEOF_VOIDP too, to make sure it
doesn't ever conflict with something that autoconf generates.
-Phil
Sam Lang wrote:
Ex
Phil somehow the server got backed up so I didn't get your first
email. Looks like you beat me to it. :-)
I've committed the suggested changes.
-sam
On Apr 5, 2006, at 1:21 PM, Phil Carns wrote:
Looks good to me. My only suggestions would be to rename it to
PVFS2_ALIGN_VAR and put it i