Subject: Endian bug in lib/libc/arch/mips/gen/infinity.c
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: port-pmax
Date: 06/21/1995 09:36:37
I'm *sure* I griped about this last year...
(tho' the fix I suggested then wasn't nearly so clean).


*** lib/libc/arch/mips/gen/infinity.c.DIST	Sun Mar 19 23:20:08 1995
--- lib/libc/arch/mips/gen/infinity.c	Wed Jun 21 08:21:59 1995
***************
*** 5,10 ****
--- 5,15 ----
  /* infinity.c */
  
  #include <math.h>
+ #include <machine/endian.h>
  
  /* bytes for +Infinity on a MIPS */
+ #if BYTE_ORDER == BIG_ENDIAN
  char __infinity[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 };
+ #else
+ char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
+ #endif