From: "Daniel Richard G." <skunk@iskunk.org>
To: linux-kernel@vger.kernel.org
Cc: marcelo@conectiva.com.br, torvalds@osdl.org
Subject: [PATCH] include/asm-i386/byteorder.h: ANSI mode fixes
Date: Wed, 17 Dec 2003 02:18:29 -0500 [thread overview]
Message-ID: <20031217071829.GA30851@midnight> (raw)
This header file uses `inline' where it should use `__inline__', `asm'
where it should use `__asm__'. GCC with -ansi barfs if it sees these
keywords without the double underscores. Headaches for the KDE folks:
http://bugs.kde.org/show_bug.cgi?id=67269
http://bugs.kde.org/show_bug.cgi?id=70100
(Note that the header already uses __inline__ and __asm__ for the most
part---this patch addresses the three remaining exceptions.)
Patch applies equally against latest 2.4.23(bk12) and 2.6.0-test11(bk12)
revs; the header file is identical in both.
Please Cc: me on any replies.
--------BEGIN PATCH--------
--- include/asm-i386/byteorder.h.orig 2003-12-17 01:19:49.000000000 -0500
+++ include/asm-i386/byteorder.h 2003-12-17 01:20:37.000000000 -0500
@@ -35,7 +35,7 @@
}
-static inline __u64 ___arch__swab64(__u64 val)
+static __inline__ __u64 ___arch__swab64(__u64 val)
{
union {
struct { __u32 a,b; } s;
@@ -43,13 +43,13 @@
} v;
v.u = val;
#ifdef CONFIG_X86_BSWAP
- asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
- : "=r" (v.s.a), "=r" (v.s.b)
- : "0" (v.s.a), "1" (v.s.b));
+ __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
+ : "=r" (v.s.a), "=r" (v.s.b)
+ : "0" (v.s.a), "1" (v.s.b));
#else
- v.s.a = ___arch__swab32(v.s.a);
+ v.s.a = ___arch__swab32(v.s.a);
v.s.b = ___arch__swab32(v.s.b);
- asm("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
+ __asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
#endif
return v.u;
}
--------END PATCH--------
--Danny
--
NAME = Daniel Richard G. ## Remember, skunks _\|/_ meef?
EMAIL1 = skunk@iskunk.org ## don't smell bad--- (/o|o\) /
EMAIL2 = skunk@alum.mit.edu ## it's the people who < (^),>
WWW = http://www.******.org/ ## annoy them that do! / \
next reply other threads:[~2003-12-17 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-17 7:18 Daniel Richard G. [this message]
2003-12-17 7:35 ` [PATCH] include/asm-i386/byteorder.h: ANSI mode fixes bert hubert
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=20031217071829.GA30851@midnight \
--to=skunk@iskunk.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@osdl.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