mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [patch 4/8] fix exported flock64 constants
Date: Mon, 18 Sep 2006 03:27:44 +0200	[thread overview]
Message-ID: <20060918013217.154667000@klappe.arndb.de> (raw)
In-Reply-To: <1158079495.9189.125.camel@hades.cambridge.redhat.com>

[-- Attachment #1: headercheck-fcntl.diff --]
[-- Type: text/plain, Size: 6321 bytes --]

The asm-generic/fcntl.h header relied on CONFIG_64BIT
to determine if it should define some of its contents.

This does not work in user space where no CONFIG_ symbols
are available, so introduce a new __ARCH_FLOCK64 symbol
that is set by asm/fcntl.h before including asm-generic/fcntl.h
when an architecture wants these.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
--- a/include/asm-arm/fcntl.h
+++ b/include/asm-arm/fcntl.h
@@ -6,6 +6,8 @@
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
 
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
 
 #endif
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h
index d85995e..23c5875 100644
--- a/include/asm-arm26/fcntl.h
+++ b/include/asm-arm26/fcntl.h
@@ -8,6 +8,8 @@
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
 
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
 
 #endif
diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h
index 46ab12d..a025b36 100644
--- a/include/asm-cris/fcntl.h
+++ b/include/asm-cris/fcntl.h
@@ -1 +1,3 @@
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h
index 46ab12d..a025b36 100644
--- a/include/asm-frv/fcntl.h
+++ b/include/asm-frv/fcntl.h
@@ -1 +1,3 @@
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index c154b9d..55e8eff 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -121,7 +121,7 @@ struct flock {
 };
 #endif
 
-#ifndef CONFIG_64BIT
+#ifdef __ARCH_FLOCK64
 
 #ifndef F_GETLK64
 #define F_GETLK64	12	/*  using 'struct flock64' */
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h
index 1952cb2..e0001cd 100644
--- a/include/asm-h8300/fcntl.h
+++ b/include/asm-h8300/fcntl.h
@@ -6,6 +6,8 @@
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
 
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
 
 #endif /* _H8300_FCNTL_H */
diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h
index 46ab12d..a025b36 100644
--- a/include/asm-i386/fcntl.h
+++ b/include/asm-i386/fcntl.h
@@ -1 +1,3 @@
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h
index 1dd275d..622d230 100644
--- a/include/asm-ia64/fcntl.h
+++ b/include/asm-ia64/fcntl.h
@@ -8,6 +8,8 @@
 #define force_o_largefile()	\
 		(personality(current->personality) != PER_LINUX32)
 
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
 
 #endif /* _ASM_IA64_FCNTL_H */
diff --git a/include/asm-m32r/fcntl.h b/include/asm-m32r/fcntl.h
index 46ab12d..a025b36 100644
--- a/include/asm-m32r/fcntl.h
+++ b/include/asm-m32r/fcntl.h
@@ -1 +1,3 @@
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h
index 1c369b2..d9070e4 100644
--- a/include/asm-m68k/fcntl.h
+++ b/include/asm-m68k/fcntl.h
@@ -6,6 +6,8 @@
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
 
+#define __ARCH_FLOCK64
+
 #include <asm-generic/fcntl.h>
 
 #endif /* _M68K_FCNTL_H */
diff --git a/include/asm-m68knommu/fcntl.h b/include/asm-m68knommu/fcntl.h
index f6a552c..237f6b8 100644
--- a/include/asm-m68knommu/fcntl.h
+++ b/include/asm-m68knommu/fcntl.h
@@ -1 +1,3 @@
+#define __ARCH_FLOCK64
+
 #include <asm-m68k/fcntl.h>
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h
index 787220e..bab60a4 100644
--- a/include/asm-mips/fcntl.h
+++ b/include/asm-mips/fcntl.h
@@ -55,6 +55,8 @@ struct flock {
 
 #define HAVE_ARCH_STRUCT_FLOCK
 
+#define __ARCH_FLOCK64
+
 #endif /* CONFIG_32BIT */
 
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h
index 317851f..df97fd4 100644
--- a/include/asm-parisc/fcntl.h
+++ b/include/asm-parisc/fcntl.h
@@ -33,6 +33,10 @@
 #define F_WRLCK		02
 #define F_UNLCK		03
 
+#ifndef __LP64__
+#define __ARCH_FLOCK64
+#endif
+
 #include <asm-generic/fcntl.h>
 
 #endif
diff --git a/include/asm-powerpc/fcntl.h b/include/asm-powerpc/fcntl.h
index ce5c451..a399283 100644
--- a/include/asm-powerpc/fcntl.h
+++ b/include/asm-powerpc/fcntl.h
@@ -6,6 +6,10 @@
 #define O_LARGEFILE     0200000
 #define O_DIRECT	0400000	/* direct disk access hint */
 
+#ifndef __powerpc64__
+#define __ARCH_FLOCK64
+#endif
+
 #include <asm-generic/fcntl.h>
 
 #endif /* _ASM_FCNTL_H */
diff --git a/include/asm-s390/fcntl.h b/include/asm-s390/fcntl.h
index 46ab12d..1495a78 100644
--- a/include/asm-s390/fcntl.h
+++ b/include/asm-s390/fcntl.h
@@ -1 +1,4 @@
+#ifndef __s390x__
+#define __ARCH_FLOCK64
+#endif
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-sh/fcntl.h b/include/asm-sh/fcntl.h
index 46ab12d..0128121 100644
--- a/include/asm-sh/fcntl.h
+++ b/include/asm-sh/fcntl.h
@@ -1 +1,2 @@
+#define __ARCH_FLOCK64
 #include <asm-generic/fcntl.h>
diff --git a/include/asm-sh64/fcntl.h b/include/asm-sh64/fcntl.h
index 744dd79..f887490 100644
--- a/include/asm-sh64/fcntl.h
+++ b/include/asm-sh64/fcntl.h
@@ -1 +1,2 @@
+#define __ARCH_FLOCK64
 #include <asm-sh/fcntl.h>
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h
index 5db60b5..ce3e074 100644
--- a/include/asm-sparc/fcntl.h
+++ b/include/asm-sparc/fcntl.h
@@ -30,6 +30,7 @@
 
 #define __ARCH_FLOCK_PAD	short __unused;
 #define __ARCH_FLOCK64_PAD	short __unused;
+#define __ARCH_FLOCK64
 
 #include <asm-generic/fcntl.h>
 
diff --git a/include/asm-v850/fcntl.h b/include/asm-v850/fcntl.h
index 3af4d56..ef49898 100644
--- a/include/asm-v850/fcntl.h
+++ b/include/asm-v850/fcntl.h
@@ -6,6 +6,7 @@
 #define O_DIRECT       0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
 
+#define __ARCH_FLOCK64
 #include <asm-generic/fcntl.h>
 
 #endif /* __V850_FCNTL_H__ */
diff --git a/include/asm-xtensa/fcntl.h b/include/asm-xtensa/fcntl.h
index ec066ae..b1f33a9 100644
--- a/include/asm-xtensa/fcntl.h
+++ b/include/asm-xtensa/fcntl.h
@@ -55,6 +55,7 @@ struct flock64 {
 
 #define HAVE_ARCH_STRUCT_FLOCK
 #define HAVE_ARCH_STRUCT_FLOCK64
+#define __ARCH_FLOCK64
 
 #include <asm-generic/fcntl.h>
 

--


  parent reply	other threads:[~2006-09-18  1:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1158079495.9189.125.camel@hades.cambridge.redhat.com>
2006-09-18  1:27 ` [patch 0/8] Re: All arch maintainers: 'make headers_check' fails on most architectures Arnd Bergmann
2006-09-18  1:27 ` [patch 1/8] extend make headers_check to detect more problems Arnd Bergmann
2006-09-18  6:21   ` Sam Ravnborg
2006-09-18  6:45     ` David Woodhouse
2006-09-21 15:13       ` David Woodhouse
2006-09-18  8:05     ` Arnd Bergmann
2006-09-18  8:10       ` David Woodhouse
2006-09-23 11:04   ` David Woodhouse
2006-09-23 13:18     ` Arnd Bergmann
2006-09-18  1:27 ` [patch 2/8] fix byteorder headers for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 3/8] hide kernel-only parts of some installed headers Arnd Bergmann
2006-09-18  1:27 ` Arnd Bergmann [this message]
2006-09-18  1:27 ` [patch 5/8] add missing #includes in user space parts of headers Arnd Bergmann
2006-09-18  1:27 ` [patch 6/8] annotate header files for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 8/8] annotate netfilter header " Arnd Bergmann
2006-09-18  1:37 ` [patch 7/8] annotate if_* " Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060918013217.154667000@klappe.arndb.de \
    --to=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome