Skip to content

Use _strnicmp on windows#1686

Closed
LeonarddeR wants to merge 2 commits into
liblouis:masterfrom
LeonarddeR:_strnicmp
Closed

Use _strnicmp on windows#1686
LeonarddeR wants to merge 2 commits into
liblouis:masterfrom
LeonarddeR:_strnicmp

Conversation

@LeonarddeR

Copy link
Copy Markdown
Member

On windows, strncasecmp is not available. _strnicmp should be functionally equivalent.

cc @bertfrees @egli

fixes #1685

@egli egli added this to the 3.32 milestone Dec 2, 2024
@egli

egli commented Dec 2, 2024

Copy link
Copy Markdown
Member

I think the real fix is probably to use the strncasecmp module from gnulib

@egli

egli commented Dec 2, 2024

Copy link
Copy Markdown
Member

But that is more involved

@LeonarddeR

Copy link
Copy Markdown
Member Author

Basically everything I can find on the web suggests using _strnicmp instead.

@egli

egli commented Dec 3, 2024

Copy link
Copy Markdown
Member

I think #1688 should solve this in a battle-tested way

@egli egli added the windows Related to Microsoft Windows label Dec 3, 2024
@LeonarddeR

Copy link
Copy Markdown
Member Author

Thanks!

@LeonarddeR LeonarddeR closed this Dec 3, 2024
seanbudd pushed a commit to nvaccess/nvda that referenced this pull request Dec 4, 2024
Update to liblouis 3.32

Description of user facing changes
None

Description of development approach
Update submodule
In this version, a dependency on Gnulib was introduced that doesn't build on Windows. See NMAKE on Windows is broken liblouis/liblouis#1689 . I fixed this using the approach from Use _strnicmp on windows liblouis/liblouis#1686. In short, rather than posix strncasecmp, we use _strnicmp .
Testing strategy:
Unit tests, running from source

Known issues with pull request:
Based on the second point as noted below development approach, an alternative could be just removing the metadata part from our liblouis build, which can be used by simply commenting out 'metadata.c' from sconscript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Related to Microsoft Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nnmake fails to build

2 participants