[PATCH] Clean up struct flock64 definitions
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Sep 2005 22:18:01 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:38 +0000 (16:57 -0700)
This patch gathers all the struct flock64 definitions (and the operations),
puts them under !CONFIG_64BIT and cleans up the arch files.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 files changed:
include/asm-arm/fcntl.h
include/asm-arm26/fcntl.h
include/asm-cris/fcntl.h
include/asm-frv/fcntl.h
include/asm-generic/fcntl.h
include/asm-h8300/fcntl.h
include/asm-i386/fcntl.h
include/asm-m32r/fcntl.h
include/asm-m68k/fcntl.h
include/asm-mips/fcntl.h
include/asm-parisc/fcntl.h
include/asm-ppc/fcntl.h
include/asm-s390/fcntl.h
include/asm-sh/fcntl.h
include/asm-sh64/fcntl.h
include/asm-sparc/fcntl.h
include/asm-v850/fcntl.h
include/asm-xtensa/fcntl.h

index 1816a6ac6f10cc1e3bab6c93a42c47e9e5bcaa39..a80b6607b2efe35281d476d852e106cd3d6ca31b 100644 (file)
@@ -6,18 +6,6 @@
 #define O_DIRECT       0200000 /* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif
index b88f8d08c60cc98de2aa9957ffe3e6832748cb31..d85995e7459e4e011bcd3215c5ebe4a970721f9b 100644 (file)
@@ -8,18 +8,6 @@
 #define O_DIRECT       0200000 /* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif
index f8e7d1307ebc28f6df06f7f301c87575e8bdf96e..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,18 +1 @@
-#ifndef _CRIS_FCNTL_H
-#define _CRIS_FCNTL_H
-
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif
index 0b212d945adbb11b6225e8dd5c9c5c7f40224848..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,19 +1 @@
-#ifndef _ASM_FCNTL_H
-#define _ASM_FCNTL_H
-
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif /* _ASM_FCNTL_H */
-
index b001d7fe03848e1560da0dd5a75951b4d9f61832..b663520dcdc487531caea8fbed1908fefa0f5754 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _ASM_GENERIC_FCNTL_H
 #define _ASM_GENERIC_FCNTL_H
 
+#include <linux/config.h>
 #include <linux/types.h>
 
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
@@ -121,4 +122,28 @@ struct flock {
 };
 #endif
 
+#ifndef CONFIG_64BIT
+
+#ifndef F_GETLK64
+#define F_GETLK64      12      /*  using 'struct flock64' */
+#define F_SETLK64      13
+#define F_SETLKW64     14
+#endif
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK64
+#ifndef __ARCH_FLOCK64_PAD
+#define __ARCH_FLOCK64_PAD
+#endif
+
+struct flock64 {
+       short  l_type;
+       short  l_whence;
+       loff_t l_start;
+       loff_t l_len;
+       pid_t  l_pid;
+       __ARCH_FLOCK64_PAD
+};
+#endif
+#endif /* !CONFIG_64BIT */
+
 #endif /* _ASM_GENERIC_FCNTL_H */
index 8caeb05e84df54ba50b6b61688f2f4cc53cadc5e..1952cb2e3b06e406f865cba82eb64fb790628804 100644 (file)
@@ -6,18 +6,6 @@
 #define O_DIRECT       0200000 /* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif /* _H8300_FCNTL_H */
index 01f17d29d2880f10073a651f40554cb18522b15f..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,18 +1 @@
-#ifndef _I386_FCNTL_H
-#define _I386_FCNTL_H
-
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif
index 90f71735fa9a2c26a632bc599ef3f131e21a3f5b..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,18 +1 @@
-#ifndef _ASM_M32R_FCNTL_H
-#define _ASM_M32R_FCNTL_H
-
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif  /* _ASM_M32R_FCNTL_H */
index d3b24e3fbac03d4c770b5185a7bb09fe4e18c8f7..1c369b20dc45b7587ad0993cb272dd57390b50d1 100644 (file)
@@ -6,18 +6,6 @@
 #define O_DIRECT       0200000 /* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif /* _M68K_FCNTL_H */
index fb824bf0929660e5791260e7ced2912275e931da..06c5d13faf6629f933c22c7f70cb9ceea14495dd 100644 (file)
@@ -52,15 +52,6 @@ struct flock {
        long    pad[4];
 };
 
-typedef struct flock64 {
-       short   l_type;
-       short   l_whence;
-       loff_t  l_start;
-       loff_t  l_len;
-       pid_t   l_pid;
-} flock64_t;
-
-
 #define HAVE_ARCH_STRUCT_FLOCK
 
 #endif
@@ -68,5 +59,8 @@ typedef struct flock64 {
 #include <asm-generic/fcntl.h>
 
 typedef struct flock flock_t;
+#ifndef __mips64
+typedef struct flock64 flock64_t;
+#endif
 
 #endif /* _ASM_FCNTL_H */
index eadda003c201b31502c54ac523b31718aea809c4..317851fa78f3f99b702ba30fff49dea37da728ef 100644 (file)
 #define F_WRLCK                02
 #define F_UNLCK                03
 
-struct flock64 {
-       short l_type;
-       short l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif
index 4480f21bfdea14a0571ebebc885ba47692bef695..7ef37443cc5c18225a2cddf9b4e677c100911d49 100644 (file)
@@ -6,20 +6,6 @@
 #define O_LARGEFILE     0200000
 #define O_DIRECT       0400000 /* direct disk access hint */
 
-#ifndef __powerpc64__
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-#endif
-
 #include <asm-generic/fcntl.h>
 
 #endif /* _PPC_FCNTL_H */
index 3a66fba09ee90569b58bcacb45ac0e30ee36a63d..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,27 +1 @@
-/*
- *  include/asm-s390/fcntl.h
- *
- *  S390 version
- *
- *  Derived from "include/asm-i386/fcntl.h"
- */
-#ifndef _S390_FCNTL_H
-#define _S390_FCNTL_H
-
-#ifndef __s390x__
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-#endif
-
 #include <asm-generic/fcntl.h>
-
-#endif
index c481bab8ba17a89e341fd975f95299a7917a145f..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,19 +1 @@
-#ifndef __ASM_SH_FCNTL_H
-#define __ASM_SH_FCNTL_H
-
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif /* __ASM_SH_FCNTL_H */
-
index ffcc36c64fa5a3dc01996514010d176bc495b443..744dd79b9d5d4ee40c5a63e1542c5cf26109fc13 100644 (file)
@@ -1,7 +1 @@
-#ifndef __ASM_SH64_FCNTL_H
-#define __ASM_SH64_FCNTL_H
-
 #include <asm-sh/fcntl.h>
-
-#endif /* __ASM_SH64_FCNTL_H */
-
index 634557374e955615004a3adce28ce73f0c8e49b7..5db60b5ae7b09d26812f7dfb1d735183e721aced 100644 (file)
 #define F_SETLK                8
 #define F_SETLKW       9
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
 /* for posix fcntl() and lockf() */
 #define F_RDLCK                1
 #define F_WRLCK                2
 #define F_UNLCK                3
 
-struct flock64 {
-       short l_type;
-       short l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t l_pid;
-       short __unused;
-};
-
 #define __ARCH_FLOCK_PAD       short __unused;
+#define __ARCH_FLOCK64_PAD     short __unused;
 
 #include <asm-generic/fcntl.h>
 
index 0fd47f0c6a8afa073174f5179aabde35f54a6012..3af4d56776ddfafe217e81fd5da095d83e29f19e 100644 (file)
@@ -6,18 +6,6 @@
 #define O_DIRECT       0200000 /* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
-#define F_GETLK64      12      /*  using 'struct flock64' */
-#define F_SETLK64      13
-#define F_SETLKW64     14
-
-struct flock64 {
-       short  l_type;
-       short  l_whence;
-       loff_t l_start;
-       loff_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif /* __V850_FCNTL_H__ */
index fdae0e170585b1a4777024d4125230e9565df159..ec066ae96caf166c09433442f2ac516d2c501c8c 100644 (file)
@@ -54,6 +54,7 @@ struct flock64 {
 };
 
 #define HAVE_ARCH_STRUCT_FLOCK
+#define HAVE_ARCH_STRUCT_FLOCK64
 
 #include <asm-generic/fcntl.h>