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:
Steve Karg
2020-05-24 09:36:21 -05:00
committed by GitHub
parent 764e0e8448
commit cbfa74e48d
25 changed files with 354 additions and 257 deletions
+3 -1
View File
@@ -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