diff options
Diffstat (limited to 'libgfortran/io/open.c')
-rw-r--r-- | libgfortran/io/open.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 9d3988a..fab2065 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -805,8 +805,6 @@ st_open (st_parameter_open *opp) conv = compile_options.convert; } - /* We use big_endian, which is 0 on little-endian machines - and 1 on big-endian machines. */ switch (conv) { case GFC_CONVERT_NATIVE: @@ -814,11 +812,11 @@ st_open (st_parameter_open *opp) break; case GFC_CONVERT_BIG: - conv = big_endian ? GFC_CONVERT_NATIVE : GFC_CONVERT_SWAP; + conv = __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? GFC_CONVERT_NATIVE : GFC_CONVERT_SWAP; break; case GFC_CONVERT_LITTLE: - conv = big_endian ? GFC_CONVERT_SWAP : GFC_CONVERT_NATIVE; + conv = __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? GFC_CONVERT_SWAP : GFC_CONVERT_NATIVE; break; default: |