PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check
authorJanne Blomqvist <jb@gcc.gnu.org>
Wed, 22 Nov 2017 19:19:13 +0000 (21:19 +0200)
committerJanne Blomqvist <jb@gcc.gnu.org>
Wed, 22 Nov 2017 19:19:13 +0000 (21:19 +0200)
commit5675291ddbc7c7bee1b4722f1358a276365c0ee5
treed591cf873aa6b611276b396c56845bbd1e9af949
parent90b415f686b16f9492cd9b11c4f5c3f3c937d5d9
PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check

By using the __BYTE_ORDER__ predefined macro we don't need the
determine_endianness function anymore.

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/83097
* io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined
macro.
* io/open.c (st_open): Likewise.
* io/transfer.c (data_transfer_init): Likewise.
* io/write.c (btoa_big): Likewise.
(otoa_big): Likewise.
(ztoa_big): Likewise.
* libgfortran.h (big_endian): Remove variable.
(GFOR_POINTER_TO_L1): Use __BYTE_ORDER__ macro.
* runtime/main.c (determine_endianness): Remove function.
(init): Remove call to determine_endianness.
* runtime/minimal.c: Remove setting big_endian variable.

From-SVN: r255072
libgfortran/ChangeLog
libgfortran/io/inquire.c
libgfortran/io/open.c
libgfortran/io/transfer.c
libgfortran/io/write.c
libgfortran/libgfortran.h
libgfortran/runtime/main.c
libgfortran/runtime/minimal.c