Skip to contentSkip to conversation

__u64 in user space

PATCH In review Alessandro Rubini 2 participants 3 messages Aug 14, 2000

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 __u64 in user space

Disclaimer: I'm not subcribed to this list.

I'm currently looking at the data types used in the kernel/user interface, and I think include/asm-sparc64/types.h has a problem in how the __u64 and __s64 symbols are defined. Since user space has 32-bit-wide longs, they end out being 32 bits wide. A quick check shows that the type is seldom use, and it may never have appeared in sparc64 user space.

I think this patch is good, but I'm not an expert of sparc issues. (this is taken against the current 2.4 CVS, but the same problem applies to 2.2).

types.h renamed from types.h.orig +5 -0
@@ -26,8 +26,13 @@
 typedef __signed__ int __s32;
 typedef unsigned int __u32;
 
+#ifdef __sparc_v9__
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
+#else
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
 
 #ifdef __KERNEL__
 
#1 lore raw

32-bit userspace should be getting their headers from asm-sparc and every Sparc distribution makes sure this is the case even if a sparc64 kernel drives the machine.

Your change is wrong :-)

Later,
David S. Miller
[email protected]