Files
uc2/cli
Eremey Valetov 87c5cf3b48 Windows MSVC build: more compat-layer fixes
Round 2 of c67b631 cleanup.  After the dirent + utime fixes, the
MSVC link surface still had:

- LNK2005 'fopen already defined': dropped g_fopen so we no longer
  override the SDK's fopen.  UTF-8 paths still work on Windows 10
  with the active-codepage manifest; non-Unicode codepages will see
  ANSI translation.  This is good enough for the public release; a
  full UTF-8 fopen wrapper can be added later if needed.

- LNK2019 'unresolved S_ISDIR / S_ISREG': MSVC's <sys/stat.h> defines
  _S_IFDIR / _S_IFREG but not the POSIX S_IS* macros.  Add them in
  the unistd.h shim (which main.c already pulls).

- LNK1181 'cannot open input file m.lib': test_merkle and test_rans
  linked libm unconditionally.  Math is in the default CRT on MSVC;
  link 'm' only on non-Windows.

- 'unistd.h' not found in test_blockstore.c: it actually only needs
  getpid().  Use <process.h> + #define getpid _getpid on MSVC, keep
  <unistd.h> elsewhere.
2026-05-04 16:45:20 -04:00
..