fixed definitions of INLINE macros for old gcc

This commit is contained in:
2014-04-21 15:34:57 +00:00
parent cfb3eb93ec
commit 257dbbb586
3 changed files with 10 additions and 6 deletions

View File

@ -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);
}

View File

@ -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)