From c10f47db21ac328e25ada36200a9edbe8544c925 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 10 Oct 2000 21:35:00 +0000 Subject: [PATCH] removed static definition inside header file --- src/libCom/osi/os/default/osiWireFormat.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libCom/osi/os/default/osiWireFormat.h b/src/libCom/osi/os/default/osiWireFormat.h index b218f0ecc..043951a3e 100644 --- a/src/libCom/osi/os/default/osiWireFormat.h +++ b/src/libCom/osi/os/default/osiWireFormat.h @@ -26,14 +26,17 @@ // network byte stream. // -static const unsigned osiWireFormatEndianTest = 1u; -static const char * const pOSIWireFormatEndianTest = reinterpret_cast < const char * > ( &osiWireFormatEndianTest ); - // this endian test should vanish during optimization // and therefore be executed only at compile time inline bool osiLittleEndian () { - if ( *pOSIWireFormatEndianTest ) { + union { + epicsUInt32 uint; + epicsUInt8 uchar[4]; + } osiWireFormatEndianTest; + + osiWireFormatEndianTest.uint = 1; + if ( osiWireFormatEndianTest.uchar[0] == 1 ) { return true; } else {