vserver 1.9.5.x5
[linux-2.6.git] / scripts / mod / file2alias.c
index f38c6d7..7c8f064 100644 (file)
 
 #include "modpost.h"
 
-/* We use the ELF typedefs, since we can't rely on stdint.h being present. */
-
+/* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
+ * use either stdint.h or inttypes.h for the rest. */
 #if KERNEL_ELFCLASS == ELFCLASS32
-typedef Elf32_Addr     kernel_ulong_t;
+typedef Elf32_Addr     kernel_ulong_t;
+#else
+typedef Elf64_Addr     kernel_ulong_t;
+#endif
+#ifdef __sun__
+#include <inttypes.h>
 #else
-typedef Elf64_Addr     kernel_ulong_t;
+#include <stdint.h>
 #endif
 
-typedef Elf32_Word     __u32;
-typedef Elf32_Half     __u16;
-typedef unsigned char  __u8;
+typedef uint32_t       __u32;
+typedef uint16_t       __u16;
+typedef unsigned char  __u8;
 
 /* Big exception to the "don't include kernel headers into userspace, which
  * even potentially has different endianness and word sizes, since