fix mingw32 build errors and warnings - #4
Merged
Merged
Conversation
- define usleep() as Sleep() on Win32 so the #ifdef branches around each sleep call can go away. usleep() was undeclared on mingw32 because unistd.h is only included on non-Windows. - memset(tm, 0, sizeof(tm)) cleared only the size of the pointer, not the struct it points at. - drop the unused loop counter n in res_popen(). - print the read size with %lld instead of %I64d; current mingw-w64 uses ANSI stdio. - drop -mtune=i686 from Makefile.w32. Claude-Session: https://claude.ai/code/session_015AgpKrpE6ejPM4MWRWb8HQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mingw32-make -f Makefile.w32failed with'usleep' was not declared in this scope, plus a few warnings. This fixes all of them; a clean build is now warning-free.usleep()asSleep()on Win32 so the#ifdefbranches around each sleep call can go away.usleep()was undeclared on mingw32 becauseunistd.his only included on non-Windows.memset(tm, 0, sizeof(tm))cleared only the size of the pointer, not the struct it points at.ninres_popen().%lldinstead of%I64d; current mingw-w64 uses ANSI stdio.-mtune=i686fromMakefile.w32.https://claude.ai/code/session_015AgpKrpE6ejPM4MWRWb8HQ