Bugfix/bacnet real endian simplify (#89)
* Remove dependence on endian define * Make use of existing big_endian function if BACNET_BIG_ENDIAN is not defined * Add efficient endian macro option if available Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
|
||||
/** @file bigend.c Determination of Endianess */
|
||||
|
||||
#include "bigend.h"
|
||||
#include "bacnet/basic/sys/bigend.h"
|
||||
|
||||
#ifndef BACNET_BIG_ENDIAN
|
||||
/* Big-Endian systems save the most significant byte first. */
|
||||
/* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */
|
||||
/* "Network Byte Order" is also know as "Big-Endian Byte Order" */
|
||||
@@ -46,3 +47,4 @@ int big_endian(void)
|
||||
|
||||
return (u.c[sizeof(long) - 1] == 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user