Skip to content

Fix mingw build (only) #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 26, 2025

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Jan 26, 2025

Separated from PR #3 that also tries to fix tests and code, and may take more time to complete through all the questionable changes into production code (e.g. flushing or not upon reconnection attempts).

This subset of those changes focuses more strictly on passing builds without warnings, due to regressions allegedly due to upstream v3.1.10->v3.1.11 bump, so these fixes could be up-streamed separately:

  • changes in rtu_usb branch not as portable as they should be (printing of int types)
  • casting of setsockopt() pointer to data
  • use of inet_ntop()/inet_pton() absent on Windows (at least MINGW on Linux cross-build environments, MSYS2 does not seem to suffer this one) - configure detection and fallback implementation code imported from NUT
  • ip.h needs in.h explicitly on some platforms

Enhancements:

  • allow to ./configure --enable-Werror in test builds, to fail the build upon any compiler warnings (not enabled by default), allowing to easily iterate on the code fixes
  • enhance some debug printouts, add end-of-lines and and console flushing before/after certain messages

jimklimov and others added 10 commits January 26, 2025 12:53

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Also define WARNING_CXXFLAGS even if not used at the moment; the
script already does juggle CXXFLAGS and detects PROG_CXX anyway.

Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ds (mingw)

Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ntop() from NUT for cross-builds on WIN32 (mingw)

Adapted to libmodbus codebase and clang-format

Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…uires netinet/in.h explicitly included first

Looking at FreeBSD, OpenIndiana et al.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e-bracket debug printout

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…, report it as such (not as generic "select()")

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…f() to sync the output

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…tuations

Signed-off-by: Jim Klimov <jimklimov@gmail.com>
@jimklimov jimklimov added bug Something isn't working enhancement New feature or request labels Jan 26, 2025
@jimklimov jimklimov merged commit 9cc7c34 into networkupstools:rtu_usb Jan 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant