All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/3]
@ 2004-08-27 21:53 trini
  2004-08-27 22:00 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: trini @ 2004-08-27 21:53 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel, trini, jdubois


#   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>
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/3]
  2004-08-27 21:53 [patch 1/3] trini
@ 2004-08-27 22:00 ` Tom Rini
  2004-08-29  8:10   ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2004-08-27 22:00 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel, jdubois

On Fri, Aug 27, 2004 at 02:53:04PM -0700, trini@kernel.crashing.org wrote:

> #   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>

Arg, I thought I refpatch'ed, but didn't, so they all came out just a
bit wrong.  The descs elsewhere were correct, but this should have been:
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 testing for __sun__ and
using <inttypes.h> there, and <stdint.h> everywhere else.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/3]
  2004-08-27 22:00 ` Tom Rini
@ 2004-08-29  8:10   ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2004-08-29  8:10 UTC (permalink / raw)
  To: Tom Rini; +Cc: sam, linux-kernel, jdubois

On Fri, Aug 27, 2004 at 03:00:57PM -0700, Tom Rini wrote:
> On Fri, Aug 27, 2004 at 02:53:04PM -0700, trini@kernel.crashing.org wrote:
> 
> > #   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>
> 
> Arg, I thought I refpatch'ed, but didn't, so they all came out just a
> bit wrong.  The descs elsewhere were correct, but this should have been:
> 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 testing for __sun__ and
> using <inttypes.h> there, and <stdint.h> everywhere else.

All three patches applied - thanks!

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-29  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-27 21:53 [patch 1/3] trini
2004-08-27 22:00 ` Tom Rini
2004-08-29  8:10   ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.