diff --git a/qse/include/qse/macros.h b/qse/include/qse/macros.h index 7ba02647..83e96378 100644 --- a/qse/include/qse/macros.h +++ b/qse/include/qse/macros.h @@ -42,7 +42,7 @@ # undef QSE_HAVE_INLINE #endif -#if defined(__GNUC__) +#if defined(__GNUC__) && defined(__GNUC_GNU_INLINE__) # define QSE_INLINE_ALWAYS inline __attribute__((__always_inline__)) # define QSE_HAVE_INLINE_ALWAYS #elif defined(_MSC_VER) || (defined(__CC_ARM) || defined(__ARMCC__)) @@ -53,7 +53,7 @@ # undef QSE_HAVE_INLINE_ALWAYS #endif -#if defined(__GNUC__) +#if defined(__GNUC__) && defined(__GNUC_GNU_INLINE__) # define QSE_INLINE_NEVER inline __attribute__((__noinline__)) # define QSE_HAVE_INLINE_NEVER #elif (defined(__CC_ARM) || defined(__ARMCC__)) diff --git a/qse/lib/awk/StdAwk.cpp b/qse/lib/awk/StdAwk.cpp index cd5bb36a..d6d104a7 100644 --- a/qse/lib/awk/StdAwk.cpp +++ b/qse/lib/awk/StdAwk.cpp @@ -501,7 +501,8 @@ int StdAwk::setioattr ( return ret.setInt ((int_t)0); } #if defined(QSE_CHAR_IS_WCHAR) - else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0) + else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0 || + qse_strcasecmp (ptr[1], QSE_T("encoding")) == 0) { ioattr_t* ioattr; qse_cmgr_t* cmgr; @@ -557,7 +558,8 @@ int StdAwk::getioattr ( xx = args[2].setFlt ((qse_awk_flt_t)ioattr->tmout[tmout].sec + QSE_NSEC_TO_SEC((qse_awk_flt_t)ioattr->tmout[tmout].nsec)); } #if defined(QSE_CHAR_IS_WCHAR) - else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0) + else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0 || + qse_strcasecmp (ptr[1], QSE_T("encoding")) == 0) { xx = args[2].setStr (ioattr->cmgr_name); } diff --git a/qse/lib/awk/std.c b/qse/lib/awk/std.c index 98d5d9ee..90afab21 100644 --- a/qse/lib/awk/std.c +++ b/qse/lib/awk/std.c @@ -2375,7 +2375,8 @@ static int fnc_setioattr (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi) } } #if defined(QSE_CHAR_IS_WCHAR) - else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0) + else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0 || + qse_strcasecmp (ptr[1], QSE_T("encoding")) == 0) { ioattr_t* ioattr; qse_cmgr_t* cmgr; @@ -2478,7 +2479,8 @@ static int fnc_getioattr (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi) } } #if defined(QSE_CHAR_IS_WCHAR) - else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0) + else if (qse_strcasecmp (ptr[1], QSE_T("codepage")) == 0 || + qse_strcasecmp (ptr[1], QSE_T("encoding")) == 0) { rv = qse_awk_rtx_makestrvalwithstr (rtx, ioattr->cmgr_name); if (rv == QSE_NULL)