Subject: Byteorder bogon in netiso/tp_tpdu.h
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Jan-Oliver Neumann <jan@encap.Hanse.DE>
List: current-users
Date: 07/20/1994 22:42:40
tp_tpdu.h messes 'round with BYTE_ORDER if it is not defined. 

a) if BYTE_ORDER is not defined, tp_tpdu.h will #define it wrong in nearly
   all cases.
b) I think BYTE_ORDER will always be defined because netiso-sources #include
   sys/types.h and stuff. I cannot test it at the moment. If they don't do
   it, tp_tpdu.h should include <machine/endian.h>.

a + b => we do not need this ugly stuff:

*** /usr/NetBSD-current/usr/src/sys/netiso/tp_tpdu.h~	Wed Jul 20 00:09:09 1994
--- /usr/NetBSD-current/usr/src/sys/netiso/tp_tpdu.h	Wed Jul 20 00:09:25 1994
***************
*** 69,90 ****
  #ifndef _NETISO_TP_TPDU_H_
  #define _NETISO_TP_TPDU_H_
  
- #ifndef BYTE_ORDER
- /*
-  * Definitions for byte order,
-  * according to byte significance from low address to high.
-  */
- #define	LITTLE_ENDIAN	1234	/* least-significant byte first (vax) */
- #define	BIG_ENDIAN	4321	/* most-significant byte first (IBM, net) */
- #define	PDP_ENDIAN	3412	/* LSB first in word, MSW first in long (pdp) */
- 
- #ifdef vax
- #define	BYTE_ORDER	LITTLE_ENDIAN
- #else
- #define	BYTE_ORDER	BIG_ENDIAN	/* mc68000, tahoe, most others */
- #endif
- #endif /* BYTE_ORDER */
- 
  /* This much of a tpdu is the same for all types of tpdus  (except
   * DT tpdus in class 0; their exceptions are handled by the data
   * structure below
--- 69,74 ----

jan

------------------------------------------------------------------------------