VC8 (VS 2005 beta 2) compilation fix: renamed errcode to err_code to

avoid possible compiler bug


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1862 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2005-08-27 09:47:35 +00:00
parent c085c06f72
commit 592eb6cb82
+5 -5
View File
@@ -530,8 +530,8 @@ weak_alias (__regcomp, regcomp)
from either regcomp or regexec. We don't use PREG here. */ from either regcomp or regexec. We don't use PREG here. */
size_t size_t
regerror (errcode, preg, errbuf, errbuf_size) regerror (err_code, preg, errbuf, errbuf_size)
int errcode; int err_code;
const regex_t *preg; const regex_t *preg;
char *errbuf; char *errbuf;
size_t errbuf_size; size_t errbuf_size;
@@ -539,8 +539,8 @@ regerror (errcode, preg, errbuf, errbuf_size)
const char *msg; const char *msg;
size_t msg_size; size_t msg_size;
if (BE (errcode < 0 if (BE (err_code < 0
|| errcode >= (int) (sizeof (__re_error_msgid_idx) || err_code >= (int) (sizeof (__re_error_msgid_idx)
/ sizeof (__re_error_msgid_idx[0])), 0)) / sizeof (__re_error_msgid_idx[0])), 0))
/* Only error codes returned by the rest of the code should be passed /* Only error codes returned by the rest of the code should be passed
to this routine. If we are given anything else, or if other regex to this routine. If we are given anything else, or if other regex
@@ -548,7 +548,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
Dump core so we can fix it. */ Dump core so we can fix it. */
abort (); abort ();
msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg = gettext (__re_error_msgid + __re_error_msgid_idx[err_code]);
msg_size = strlen (msg) + 1; /* Includes the null. */ msg_size = strlen (msg) + 1; /* Includes the null. */