Skip to content

Improved portability beyond UNIX (e.g. MSVC)#255

Merged
attipaci merged 2 commits into
mainfrom
no-unistd
Sep 28, 2025
Merged

Improved portability beyond UNIX (e.g. MSVC)#255
attipaci merged 2 commits into
mainfrom
no-unistd

Conversation

@attipaci

@attipaci attipaci commented Sep 28, 2025

Copy link
Copy Markdown
Collaborator

Various changes to enable non-UNIX builds, esp. with MSVC.

  • No more unistd.h includes. It's a UNIX-specific header, and it turns out we did not need it at all.
  • Use the MSVC _stricmp() and _strincmp() instead of the UNIX strcasecmp() and strncasecmp(), when compiling with MSC.
  • Use the C11 timespec_get() instead of the UNIX-specific clock_gettime() when appropriate.
  • Various fixes to tests of small issues, which did not trip up gcc / clang.
  • New 'internal' function novas_set_max_iter() to set the global novas_inv_max_iter variable (since MSVC does not seem to export the variable).

@attipaci attipaci added this to the 1.5.0 milestone Sep 28, 2025
@attipaci attipaci self-assigned this Sep 28, 2025
@attipaci attipaci added the enhancement New feature or request label Sep 28, 2025
@attipaci attipaci changed the title No need to include unistd.h -- non UNIX portability No need to include unistd.h, for portability beyond UNIX Sep 28, 2025
@attipaci attipaci changed the title No need to include unistd.h, for portability beyond UNIX Do not include unistd.h, for portability beyond UNIX Sep 28, 2025
@codecov

codecov Bot commented Sep 28, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.86%. Comparing base (4a70962) to head (dd24a94).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #255   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files          24       24           
  Lines        4564     4566    +2     
  Branches      894      894           
=======================================
+ Hits         4558     4560    +2     
  Partials        6        6           
Flag Coverage Δ
unittests 99.86% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/frames.c 99.85% <ø> (ø)
src/parse.c 99.47% <100.00%> (+0.03%) ⬆️
src/refract.c 100.00% <ø> (ø)
src/target.c 100.00% <ø> (ø)
src/timescale.c 100.00% <100.00%> (ø)
src/util.c 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a70962...dd24a94. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@attipaci attipaci force-pushed the no-unistd branch 16 times, most recently from 34cc0d2 to fc6f8a2 Compare September 28, 2025 11:29
@attipaci attipaci changed the title Do not include unistd.h, for portability beyond UNIX Improved portability beyond UNIX (e.g. MSVC) Sep 28, 2025
@attipaci attipaci force-pushed the no-unistd branch 6 times, most recently from d4fcfc4 to 7481e01 Compare September 28, 2025 12:02
@attipaci attipaci force-pushed the no-unistd branch 14 times, most recently from ed6bb18 to 322a765 Compare September 28, 2025 13:22
@attipaci attipaci marked this pull request as ready for review September 28, 2025 13:29
@attipaci attipaci merged commit eb8c1ad into main Sep 28, 2025
28 checks passed
@attipaci attipaci deleted the no-unistd branch September 28, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant