Fix strcasecmp for windows, bug1651.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Kuba Ober 2019-12-20 06:58:05 -05:00 committed by Wilson Snyder
parent 9807025618
commit ee184f3f39
4 changed files with 5 additions and 2 deletions

View File

@ -24,6 +24,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix queue issues, bug1641, bug1643. [Peter Monsson, Stefan Wallentowitz] **** Fix queue issues, bug1641, bug1643. [Peter Monsson, Stefan Wallentowitz]
**** Fix strcasecmp for windows, bug1651. [Kuba Ober]
* Verilator 4.024 2019-12-08 * Verilator 4.024 2019-12-08

View File

@ -19,6 +19,7 @@ John Coiner
Julien Margetts Julien Margetts
Kanad Kanhere Kanad Kanhere
Kevin Kiningham Kevin Kiningham
Kuba Ober
Lukasz Dalek Lukasz Dalek
Maarten De Braekeleer Maarten De Braekeleer
Matthew Ballance Matthew Ballance

View File

@ -58,7 +58,7 @@ V3ErrorCode::V3ErrorCode(const char* msgp) {
// Return error encoding for given string, or ERROR, which is a bad code // Return error encoding for given string, or ERROR, which is a bad code
for (int codei=V3ErrorCode::EC_MIN; codei<V3ErrorCode::_ENUM_MAX; codei++) { for (int codei=V3ErrorCode::EC_MIN; codei<V3ErrorCode::_ENUM_MAX; codei++) {
V3ErrorCode code = V3ErrorCode(codei); V3ErrorCode code = V3ErrorCode(codei);
if (0==strcasecmp(msgp, code.ascii())) { if (0 == VL_STRCASECMP(msgp, code.ascii())) {
m_e = code; return; m_e = code; return;
} }
} }

View File

@ -250,7 +250,7 @@ V3LangCode::V3LangCode(const char* textp) {
// Return code for given string, or ERROR, which is a bad code // Return code for given string, or ERROR, which is a bad code
for (int codei=V3LangCode::L_ERROR; codei<V3LangCode::_ENUM_END; ++codei) { for (int codei=V3LangCode::L_ERROR; codei<V3LangCode::_ENUM_END; ++codei) {
V3LangCode code = V3LangCode(codei); V3LangCode code = V3LangCode(codei);
if (0==strcasecmp(textp, code.ascii())) { if (0 == VL_STRCASECMP(textp, code.ascii())) {
m_e = code; return; m_e = code; return;
} }
} }