Hello all,

The OCaml language [1] version 5.0 [2] was released last year,
switching to a multicore runtime. The previous version, 4.14,
supported Cygwin, MinGW-w64, and MSVC on Windows. The current version
now supports Cygwin and MinGW-w64, and we're working towards restoring
MSVC support.

The multicore runtime has been written using pthreads, and we're
already using winpthreads for the MinGW-w64 port. We're hoping to use
winpthreads for the MSVC ports, and I intend to submit patches
enabling that.

I'm testing my code with MSVC (latest preview, 19.39), MinGW-w64+GCC,
MinGW-w64+clang, and clang-cl.

I have patches enabling MSVC support, fixing sane warnings raised by
the above compilers, fixing little bugs, and improving POSIX
compatibility. I've tried to keep them as minimal as possible. This is
a first batch of various patches, that I hope won't be too
controversial. MSVC doesn't yet build this patch series, but the
related patches are small.

Let me know if you have any questions,

Best regards,
Antonin Décimo

[1]: https://ocaml.org/
[2]: https://ocaml.org/changelog?t=ocaml

Antonin Décimo (18):
  winpthreads: Ignore MSVC object files
  winpthreads: Move likely/unlikely to misc.h, noop under MSVC
  winpthreads: Inline INIT_RWLOCK into its only callsite
  winpthreads: Format error string with snprintf
  winpthreads: Use _strdup variant instead of strdup
  winpthreads: PIMAGE_TLS_CALLBACK returns void, not BOOL
  winpthreads: Fix TLS thread callback initializers on MSVC x64
  winpthreads: Use __assume(0) MSVC builtin for unreachable code
  winpthreads: Fix printf format specifiers
  winpthreads: Protect macros with do { ... } while (0) idiom
  winpthreads: Prevent scoping issues and warnings in cleanup_push/pop
  winpthreads: Fix include style
  winpthreads: Small cleanups for clang
  winpthreads: AC_PROG_RANLIB is obsoleted by LT_INIT
  winpthreads: Add windres-rc, a wrapper for windres to rc
  winpthreads: Fix __WINPTHREAD_ENABLE_WRAP_API typo
  winpthreads: Don't assign within a conditional expression
  winpthreads: Fix strict prototypes warnings

 .gitignore                                    |   2 +
 .../winpthreads/build-aux/windres-rc          | 158 ++++++++++++++++++
 mingw-w64-libraries/winpthreads/configure     | 117 ++-----------
 mingw-w64-libraries/winpthreads/configure.ac  |   9 +-
 .../winpthreads/include/pthread.h             |  25 ++-
 mingw-w64-libraries/winpthreads/src/barrier.c |   6 +-
 mingw-w64-libraries/winpthreads/src/barrier.h |   9 +-
 mingw-w64-libraries/winpthreads/src/clock.c   |   4 +-
 mingw-w64-libraries/winpthreads/src/cond.c    |  12 +-
 mingw-w64-libraries/winpthreads/src/cond.h    |  10 +-
 mingw-w64-libraries/winpthreads/src/misc.c    |   2 +-
 mingw-w64-libraries/winpthreads/src/misc.h    |  38 +++--
 mingw-w64-libraries/winpthreads/src/mutex.c   |   7 +-
 mingw-w64-libraries/winpthreads/src/rwlock.c  |  12 +-
 mingw-w64-libraries/winpthreads/src/rwlock.h  |   3 -
 mingw-w64-libraries/winpthreads/src/sem.c     |   6 +-
 .../winpthreads/src/spinlock.c                |   3 -
 mingw-w64-libraries/winpthreads/src/thread.c  |  69 ++++----
 mingw-w64-libraries/winpthreads/src/thread.h  |   2 +-
 .../winpthreads/src/version.rc                |  18 +-
 20 files changed, 306 insertions(+), 206 deletions(-)
 create mode 100644 mingw-w64-libraries/winpthreads/build-aux/windres-rc

-- 
2.43.0



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to