[PATCH/RFC 1/1] libc/sysdeps: add __kernel_long and __kernel_ulong
Chris Packham
chris.packham at alliedtelesis.co.nz
Tue Jul 31 05:38:11 UTC 2012
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
exported header files were updated to use these new types. This is an
automated attempt using coccinelle to update the various kernel_types.h
files.
The following semantic patch was used
@@
@@
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
...
} __kernel_fsid_t;
Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
---
libc/sysdeps/linux/alpha/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/arm/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/avr32/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/bfin/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/c6x/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/cris/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/frv/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/h8300/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/hppa/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/i386/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/ia64/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/m68k/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/microblaze/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/mips/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/nios/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/nios2/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/powerpc/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/sh/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/sh64/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/sparc/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/v850/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/vax/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/x86_64/bits/kernel_types.h | 3 +++
libc/sysdeps/linux/xtensa/bits/kernel_types.h | 3 +++
24 files changed, 72 insertions(+)
diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h
index d5574c9..3bb7fb5 100644
--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h
+++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h
@@ -34,6 +34,9 @@ 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];
} __kernel_fsid_t;
diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h
index 766a306..632a078 100644
--- a/libc/sysdeps/linux/arm/bits/kernel_types.h
+++ b/libc/sysdeps/linux/arm/bits/kernel_types.h
@@ -33,6 +33,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h
index f7d8b52..4e67af1 100644
--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h
+++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h
@@ -44,6 +44,9 @@ typedef unsigned short __kernel_old_dev_t;
typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#if defined(__USE_ALL)
int val[2];
diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h
index d69a875..1a7adc7 100644
--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h
+++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h
@@ -33,6 +33,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h
index 7557309..77fb9c8 100644
--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h
+++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h
@@ -35,6 +35,9 @@ typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h
index f122c7f..64f7dba 100644
--- a/libc/sysdeps/linux/cris/bits/kernel_types.h
+++ b/libc/sysdeps/linux/cris/bits/kernel_types.h
@@ -33,6 +33,9 @@ typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#if defined(__USE_ALL)
int val[2];
diff --git a/libc/sysdeps/linux/frv/bits/kernel_types.h b/libc/sysdeps/linux/frv/bits/kernel_types.h
index 8403fd3..cde9a4f 100644
--- a/libc/sysdeps/linux/frv/bits/kernel_types.h
+++ b/libc/sysdeps/linux/frv/bits/kernel_types.h
@@ -32,6 +32,9 @@ typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h
index 0570675..7aeb15e 100644
--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h
+++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h
@@ -33,6 +33,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h
index 4441f9b..33e02b5 100644
--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h
+++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h
@@ -46,6 +46,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h
index 9c07c72..5d5d412 100644
--- a/libc/sysdeps/linux/i386/bits/kernel_types.h
+++ b/libc/sysdeps/linux/i386/bits/kernel_types.h
@@ -42,6 +42,9 @@ typedef unsigned short __kernel_old_gid_t;
typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h
index c8ef86d..37fa00c 100644
--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h
+++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h
@@ -41,6 +41,9 @@ typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
int val[2];
} __kernel_fsid_t;
diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h
index 0a77a8f..cef402f 100644
--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h
+++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h
@@ -33,6 +33,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
index 2a70575..a584b93 100644
--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h
+++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
@@ -49,6 +49,9 @@ typedef unsigned int __kernel_old_dev_t;
typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h
index 9fc3b96..964683a 100644
--- a/libc/sysdeps/linux/mips/bits/kernel_types.h
+++ b/libc/sysdeps/linux/mips/bits/kernel_types.h
@@ -72,6 +72,9 @@ typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
long val[2];
} __kernel_fsid_t;
diff --git a/libc/sysdeps/linux/nios/bits/kernel_types.h b/libc/sysdeps/linux/nios/bits/kernel_types.h
index e66f42d..1acc5eb 100644
--- a/libc/sysdeps/linux/nios/bits/kernel_types.h
+++ b/libc/sysdeps/linux/nios/bits/kernel_types.h
@@ -32,6 +32,9 @@ typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h
index 8b86d79..69aa3d9 100644
--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h
+++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h
@@ -33,6 +33,9 @@ typedef unsigned short __kernel_old_gid_t;
typedef unsigned short __kernel_old_dev_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
index 3f3b933..f43fadb 100644
--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h
+++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
@@ -64,6 +64,9 @@ typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
int val[2];
} __kernel_fsid_t;
diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h
index f96e9fa..a65f0b2 100644
--- a/libc/sysdeps/linux/sh/bits/kernel_types.h
+++ b/libc/sysdeps/linux/sh/bits/kernel_types.h
@@ -34,6 +34,9 @@ typedef unsigned short __kernel_old_gid_t;
typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h
index 671cc83..91d991d 100644
--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h
+++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h
@@ -45,6 +45,9 @@ typedef unsigned short __kernel_old_gid_t;
typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h
index 0cc4bc2..8fe1370 100644
--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h
+++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h
@@ -65,6 +65,9 @@ typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
#endif
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h
index 3e851ab..d3443b3 100644
--- a/libc/sysdeps/linux/v850/bits/kernel_types.h
+++ b/libc/sysdeps/linux/v850/bits/kernel_types.h
@@ -42,6 +42,9 @@ 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
int val[2];
diff --git a/libc/sysdeps/linux/vax/bits/kernel_types.h b/libc/sysdeps/linux/vax/bits/kernel_types.h
index aef74b5..2e48f36 100644
--- a/libc/sysdeps/linux/vax/bits/kernel_types.h
+++ b/libc/sysdeps/linux/vax/bits/kernel_types.h
@@ -34,6 +34,9 @@ typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
index de800d7..1e114e6 100644
--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h
+++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
@@ -42,6 +42,9 @@ typedef unsigned short __kernel_old_gid_t;
typedef __kernel_dev_t __kernel_old_dev_t;
typedef long long __kernel_loff_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
#ifdef __USE_ALL
int val[2];
diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
index 44f1075..d35e636 100644
--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h
+++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
@@ -41,6 +41,9 @@ typedef long long __kernel_loff_t;
other uClibc ports and for lack of a better place. */
typedef unsigned int __kernel_dev_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
typedef struct {
int val[2];
} __kernel_fsid_t;
--
1.7.10.2.dirty
More information about the uClibc
mailing list