>That is trivially and obviously wrong. You have to do the sizeof check
>because of 64bit machines
Ok, I forgot about 64bit machines. BTW also your '20-' is obviously
_wrong_ because you are supposing that sizeof(long)-sizeof(short) is 2.
So this seems to me the only _ugly_ solution:
--- 2.3.17/include/linux/kernel.h Wed Sep 8 18:18:56 1999
+++ kernel.h Fri Sep 10 14:13:09 1999
@@ -94,8 +94,8 @@
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* swap space still available */
unsigned short procs; /* Number of current processes */
- unsigned long totalbig; /* Total big memory size */
- unsigned long freebig; /* Available big memory size */
+ unsigned long totalbig __attribute__((packed)); /* Total big memory size */
+ unsigned long freebig __attribute__((packed)); /* Available big memory size */
char _f[22-2*sizeof(long)]; /* Padding: libc5 uses this.. */
};
Anyway it's clear that such structure is very _bad_ designed w.r.t. 64bit
archs.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/