123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- From 6a76edddaa62ff06f178143b582167734cb55c18 Mon Sep 17 00:00:00 2001
- From: Chris Packham <chris.packham@alliedtelesis.co.nz>
- Date: Mon, 01 Oct 2012 05:12:54 +0000
- Subject: libc/sysdeps: add __kernel_long and __kernel_ulong
- Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
- exported header files were updated to use these new types. Add the
- definitions for __kernel_long_t and __kernel_ulong_t to the relevant
- kernel_types.h headers.
- This change was automated with the following scriptlet
- git grep --name-only 'typedef.*__kernel_old_dev_t' \
- | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\
- typedef long\t\t__kernel_long_t;\
- typedef unsigned long\t__kernel_ulong_t;'
- Whitespace in arm, avr32, hppa, sparc was then manually fixed up.
- Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
- --
- Here's a cleaned up patch which should get the whitespace right. I'm a
- bit iffy about the sparc changes they make sense to me but it's not a
- platform I have access to.
- I can break this up per arch or per maintainer if requested.
- libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++
- libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++
- libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++
- libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++
- libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++
- 22 files changed, 50 insertions(+)
- Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
- ---
- --- a/libc/sysdeps/linux/alpha/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h
- @@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_
- typedef __kernel_uid_t __kernel_uid32_t;
- typedef __kernel_gid_t __kernel_gid32_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- int val[2];
- --- a/libc/sysdeps/linux/arm/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/arm/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/avr32/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h
- @@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- --- a/libc/sysdeps/linux/bfin/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/c6x/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h
- @@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef unsigned int __kernel_size_t;
- typedef int __kernel_ssize_t;
- typedef int __kernel_ptrdiff_t;
- --- a/libc/sysdeps/linux/cris/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/cris/bits/kernel_types.h
- @@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- --- a/libc/sysdeps/linux/e1/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/e1/bits/kernel_types.h
- @@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- /*
- --- a/libc/sysdeps/linux/h8300/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/hppa/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h
- @@ -45,6 +45,8 @@ typedef long long __kernel_off64_t;
- typedef unsigned long long __kernel_ino64_t;
-
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/i386/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/i386/bits/kernel_types.h
- @@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- --- a/libc/sysdeps/linux/ia64/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h
- @@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t;
-
- typedef unsigned int __kernel_dev_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #endif /* _ASM_IA64_POSIX_TYPES_H */
- --- a/libc/sysdeps/linux/m68k/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
- @@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- --- a/libc/sysdeps/linux/mips/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/mips/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef int __kernel_gid32_t;
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #else
- typedef unsigned int __kernel_dev_t;
- @@ -68,6 +70,8 @@ typedef int __kernel_gid32_t;
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- --- a/libc/sysdeps/linux/nios2/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h
- @@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- --- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
- @@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- #else
- typedef unsigned int __kernel_dev_t;
- typedef unsigned int __kernel_ino_t;
- @@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- --- a/libc/sysdeps/linux/sh/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/sh/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- --- a/libc/sysdeps/linux/sh64/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h
- @@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- --- a/libc/sysdeps/linux/sparc/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h
- @@ -32,6 +32,8 @@ typedef unsigned short __kernel_g
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef __kernel_uid_t __kernel_uid32_t;
- typedef __kernel_gid_t __kernel_gid32_t;
- typedef int __kernel_suseconds_t;
- @@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- --- a/libc/sysdeps/linux/v850/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/v850/bits/kernel_types.h
- @@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- --- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
- @@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- --- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h
- +++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
- @@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t;
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- /* Beginning in 2.6 kernels, which is the first version that includes the
|