Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] MIPS: uapi/asm/siginfo.h: Fix GCC 4.1.2 compilation
Date: Sun, 28 Jul 2013 21:20:25 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.03.1307282107060.9486@linux-mips.org> (raw)

 It wasn't until GCC 4.3 I believe that the __SIZEOF_*__ predefined macros 
were added.  The change below switches <uapi/asm/siginfo.h> to the 
_MIPS_SZLONG macro so that compilation with e.g. GCC 4.1.2 succeeds.  
This is a user API header so I think this is even more important, for 
older userland support.  The change adds an unsuccessful default too, to 
catch any compiler configuration oddities.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---
Ralf, please apply.

  Maciej

linux-mips-sizeof.patch
Index: linux/arch/mips/include/uapi/asm/siginfo.h
===================================================================
--- linux.orig/arch/mips/include/uapi/asm/siginfo.h
+++ linux/arch/mips/include/uapi/asm/siginfo.h
@@ -25,11 +25,12 @@ struct siginfo;
 /*
  * Careful to keep union _sifields from shifting ...
  */
-#if __SIZEOF_LONG__ == 4
+#if _MIPS_SZLONG == 32
 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
-#endif
-#if __SIZEOF_LONG__ == 8
+#elif _MIPS_SZLONG == 64
 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
+#else
+#error _MIPS_SZLONG neither 32 nor 64
 #endif
 
 #include <asm-generic/siginfo.h>

             reply	other threads:[~2013-07-28 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28 20:20 Maciej W. Rozycki [this message]
2013-07-30 16:16 ` [PATCH] MIPS: uapi/asm/siginfo.h: Fix GCC 4.1.2 compilation Ralf Baechle

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=alpine.LFD.2.03.1307282107060.9486@linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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