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 2/8] fix byteorder headers for make headers_check
Date: Mon, 18 Sep 2006 03:27:42 +0200 [thread overview]
Message-ID: <20060918013216.534777000@klappe.arndb.de> (raw)
In-Reply-To: <1158079495.9189.125.camel@hades.cambridge.redhat.com>
[-- Attachment #1: check-byteorder.diff --]
[-- Type: text/plain, Size: 3354 bytes --]
This makes the header files for byteorder includeable
on 32 bit systems with gcc -ansi, where no 64 bit
integers are available.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-cg/include/linux/byteorder/big_endian.h
===================================================================
--- linux-cg.orig/include/linux/byteorder/big_endian.h 2006-09-18 02:20:36.000000000 +0200
+++ linux-cg/include/linux/byteorder/big_endian.h 2006-09-18 02:20:51.000000000 +0200
@@ -40,6 +40,7 @@
#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
+#ifdef __BYTEORDER_HAS_U64__
static inline __le64 __cpu_to_le64p(const __u64 *p)
{
return (__force __le64)__swab64p(p);
@@ -48,6 +49,7 @@
{
return __swab64p((__u64 *)p);
}
+#endif
static inline __le32 __cpu_to_le32p(const __u32 *p)
{
return (__force __le32)__swab32p(p);
Index: linux-cg/include/linux/byteorder/little_endian.h
===================================================================
--- linux-cg.orig/include/linux/byteorder/little_endian.h 2006-09-18 02:20:36.000000000 +0200
+++ linux-cg/include/linux/byteorder/little_endian.h 2006-09-18 02:20:51.000000000 +0200
@@ -40,6 +40,7 @@
#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
+#ifdef __BYTEORDER_HAS_U64__
static inline __le64 __cpu_to_le64p(const __u64 *p)
{
return (__force __le64)*p;
@@ -48,6 +49,7 @@
{
return (__force __u64)*p;
}
+#endif
static inline __le32 __cpu_to_le32p(const __u32 *p)
{
return (__force __le32)*p;
@@ -64,6 +66,7 @@
{
return (__force __u16)*p;
}
+#ifdef __BYTEORDER_HAS_U64__
static inline __be64 __cpu_to_be64p(const __u64 *p)
{
return (__force __be64)__swab64p(p);
@@ -72,6 +75,7 @@
{
return __swab64p((__u64 *)p);
}
+#endif
static inline __be32 __cpu_to_be32p(const __u32 *p)
{
return (__force __be32)__swab32p(p);
Index: linux-cg/include/linux/byteorder/pdp_endian.h
===================================================================
--- linux-cg.orig/include/linux/byteorder/pdp_endian.h 2006-09-18 02:20:36.000000000 +0200
+++ linux-cg/include/linux/byteorder/pdp_endian.h 2006-09-18 02:20:51.000000000 +0200
@@ -27,6 +27,7 @@
#define __PDP_ENDIAN_BITFIELD
#endif
+#include <linux/types.h>
#include <linux/byteorder/swab.h>
#include <linux/byteorder/swabb.h>
Index: linux-cg/include/linux/byteorder/swab.h
===================================================================
--- linux-cg.orig/include/linux/byteorder/swab.h 2006-09-18 02:20:36.000000000 +0200
+++ linux-cg/include/linux/byteorder/swab.h 2006-09-18 02:20:51.000000000 +0200
@@ -1,6 +1,7 @@
#ifndef _LINUX_BYTEORDER_SWAB_H
#define _LINUX_BYTEORDER_SWAB_H
+/* @headercheck:-include linux/types.h@ */
/*
* linux/byteorder/swab.h
* Byte-swapping, independently from CPU endianness
Index: linux-cg/include/linux/byteorder/swabb.h
===================================================================
--- linux-cg.orig/include/linux/byteorder/swabb.h 2006-09-18 02:20:36.000000000 +0200
+++ linux-cg/include/linux/byteorder/swabb.h 2006-09-18 02:20:51.000000000 +0200
@@ -1,6 +1,7 @@
#ifndef _LINUX_BYTEORDER_SWABB_H
#define _LINUX_BYTEORDER_SWABB_H
+/* @headercheck:-include linux/types.h@ */
/*
* linux/byteorder/swabb.h
* SWAp Bytes Bizarrely
--
next prev parent reply other threads:[~2006-09-18 1:38 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 ` Arnd Bergmann [this message]
2006-09-18 1:27 ` [patch 3/8] hide kernel-only parts of some installed headers Arnd Bergmann
2006-09-18 1:27 ` [patch 4/8] fix exported flock64 constants Arnd Bergmann
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=20060918013216.534777000@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
all inboxes | Powered by JetHome®