Comment for Solaris fix for the HPTC
Compiling the latest CVS code, I found that a function in vl.c uses a define called ULONG_LONG_MAX. The value is defined in solaris's sys/types.h, but only on _LP64 builds, so 32-bit builds won't pickup if I redefine it as ULONG_MAX.
I'm looking for comments on this patch.
vl.h 2007-09-15 17:59:24.179299000 -0400 renamed from vl.h 2007-08-26 13:46:00.000000000 -0400 +6 -0
@@ -49,6 +49,12 @@ #define ENOMEDIUM ENODEV #endif +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX 18446744073709551615UL +#endif + #ifdef _WIN32 #include <windows.h> #define fsync _commit
Hi Ben,
vl.h 2007-09-15 17:59:24.179299000 -0400 line 57
Quoted 6 lines · Ben Taylor
vl.h 2007-09-15 17:59:24.179299000 -0400 renamed from vl.h 2007-08-26 13:46:00.000000000 -0400 +6
-0+#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX 18446744073709551615UL +#endif +
These constants are always defined, right? So why not "#ifndef ULONG_LONG_MAX"?
Ciao,
Dscho