mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: trini@kernel.crashing.org
To: sam@ravnborg.org
Cc: linux-kernel@vger.kernel.org, trini@kernel.crashing.org, jdubois@mc.com
Subject: [patch 1/3]
Date: Fri, 27 Aug 2004 14:53:04 -0700	[thread overview]
Message-ID: <200408272153.OAA28839@av.mvista.com> (raw)


#   The following is from Jean-Christophe Dubois <jdubois@mc.com>.
#   On Solaris 2.8, <stdint.h> does not exist, but <inttypes.h> does.
#   However, on cygwin (the other odd place that the kernel is compiled
#   on) <inttypes.h> doesn't exist.  So we end up with something like
#   the following.
#   
#   Signed-off-by: Tom Rini <trini@kernel.crashing.org>
---

 linux-2.6-solaris-trini/arch/ppc/boot/utils/mkbugboot.c |   12 ++++++------
 linux-2.6-solaris-trini/arch/ppc/boot/utils/mktree.c    |    4 ++++
 linux-2.6-solaris-trini/scripts/mod/sumversion.c        |    4 ++++
 3 files changed, 14 insertions(+), 6 deletions(-)

diff -puN arch/ppc/boot/utils/mkbugboot.c~inttypes_stdint arch/ppc/boot/utils/mkbugboot.c
--- linux-2.6-solaris/arch/ppc/boot/utils/mkbugboot.c~inttypes_stdint	2004-08-27 14:29:03.092719804 -0700
+++ linux-2.6-solaris-trini/arch/ppc/boot/utils/mkbugboot.c	2004-08-27 14:29:36.311001737 -0700
@@ -1,5 +1,5 @@
 /*
- * arch/ppc/pp3boot/mkbugboot.c
+ * arch/ppc/boot/utils/mkbugboot.c
  *
  * Makes a Motorola PPCBUG ROM bootable image which can be flashed
  * into one of the FLASH banks on a Motorola PowerPlus board.
@@ -21,6 +21,11 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
+#ifdef __sun__
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
 
 #ifdef __i386__
 #define cpu_to_be32(x) le32_to_cpu(x)
@@ -49,11 +54,6 @@ unsigned short le16_to_cpu(unsigned shor
 /* size of read buffer */
 #define SIZE 0x1000
 
-/* typedef long int32_t; */
-typedef unsigned long uint32_t;
-typedef unsigned short uint16_t;
-typedef unsigned char uint8_t;
-
 /* PPCBUG ROM boot header */
 typedef struct bug_boot_header {
   uint8_t	magic_word[4];		/* "BOOT" */
diff -puN arch/ppc/boot/utils/mktree.c~inttypes_stdint arch/ppc/boot/utils/mktree.c
--- linux-2.6-solaris/arch/ppc/boot/utils/mktree.c~inttypes_stdint	2004-08-27 14:29:03.111715390 -0700
+++ linux-2.6-solaris-trini/arch/ppc/boot/utils/mktree.c	2004-08-27 14:29:36.312001505 -0700
@@ -15,7 +15,11 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#ifdef __sun__
+#include <inttypes.h>
+#else
 #include <stdint.h>
+#endif
 
 /* This gets tacked on the front of the image.  There are also a few
  * bytes allocated after the _start label used by the boot rom (see
diff -puN scripts/mod/sumversion.c~inttypes_stdint scripts/mod/sumversion.c
--- linux-2.6-solaris/scripts/mod/sumversion.c~inttypes_stdint	2004-08-27 14:29:03.136709583 -0700
+++ linux-2.6-solaris-trini/scripts/mod/sumversion.c	2004-08-27 14:29:36.313001272 -0700
@@ -1,5 +1,9 @@
 #include <netinet/in.h>
+#ifdef __sun__
+#include <inttypes.h>
+#else
 #include <stdint.h>
+#endif
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
_

             reply	other threads:[~2004-08-27 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-27 21:53 trini [this message]
2004-08-27 22:00 ` Tom Rini
2004-08-29  8:10   ` Sam Ravnborg

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=200408272153.OAA28839@av.mvista.com \
    --to=trini@kernel.crashing.org \
    --cc=jdubois@mc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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®