Skip to content

Commit

Permalink
TMP Add patches for 5.2.0~beta1
Browse files Browse the repository at this point in the history
WIP: As it stands, the number of domains is not bounded to 1, does it
matter?
  • Loading branch information
shym committed Apr 11, 2024
1 parent b84d87a commit b4ae129
Show file tree
Hide file tree
Showing 13 changed files with 1,030 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 8c8ac05b2631d5a876a2dda38530f632bfd3429d Mon Sep 17 00:00:00 2001
From: Samuel Hym <samuel.hym@rustyne.lautre.net>
Date: Tue, 27 Feb 2024 16:14:38 +0100
Subject: [PATCH 01/13] Add missing `defined` in preprocessor test

When `HAS_CLOCK_GETTIME_NSEC_NP` is not defined,
`#elif HAS_CLOCK_GETTIME_NSEC_NP` triggers a warning
---
runtime/unix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/unix.c b/runtime/unix.c
index b5fd4de17b..b397fd2c9c 100644
--- a/runtime/unix.c
+++ b/runtime/unix.c
@@ -47,7 +47,7 @@
#endif
#ifdef HAS_POSIX_MONOTONIC_CLOCK
#include <time.h>
-#elif HAS_CLOCK_GETTIME_NSEC_NP
+#elif defined(HAS_CLOCK_GETTIME_NSEC_NP)
#include <time.h>
#endif
#ifdef HAS_DIRENT
--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From ebd40ef5f42f22be63fe2507e7ba5ceacc4eb0de Mon Sep 17 00:00:00 2001
From: Samuel Hym <samuel.hym@rustyne.lautre.net>
Date: Tue, 27 Feb 2024 16:22:58 +0100
Subject: [PATCH 02/13] Include `config.h` before `HAS_GETTIMEOFDAY` is tested

Also remove a duplicate `errno.h`
---
runtime/unix.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/runtime/unix.c b/runtime/unix.c
index b397fd2c9c..abdc8cd630 100644
--- a/runtime/unix.c
+++ b/runtime/unix.c
@@ -21,6 +21,7 @@
/* Helps finding RTLD_DEFAULT in glibc */
/* also secure_getenv */

+#include "caml/config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -32,8 +33,6 @@
#endif
#include <sys/stat.h>
#include <fcntl.h>
-#include <errno.h>
-#include "caml/config.h"
#if defined(SUPPORT_DYNAMIC_LINKING) && !defined(BUILDING_LIBCAMLRUNS)
#define WITH_DYNAMIC_LINKING
#ifdef __CYGWIN__
--
2.43.0

38 changes: 38 additions & 0 deletions patches/5.2.0~beta1/0003-Fix-a-pattern-in-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 9e9992f0a192a1476b09277e365faf7a7bb3b6f0 Mon Sep 17 00:00:00 2001
From: Samuel Hym <samuel.hym@rustyne.lautre.net>
Date: Mon, 26 Feb 2024 17:48:50 +0100
Subject: [PATCH 03/13] Fix a pattern in configure

In a sh `case` pattern matching, each `|`-separated alternative must
match the complete expression
---
configure | Bin 644933 -> 644935 bytes
configure.ac | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 3b3ffdaa12dd8767ed900fcd4152c63fc0cb796d..aa9a21ffdca342513b957d4aa6a10daf55fc2f41 100755
GIT binary patch
delta 42
vcmX@QPW|{g^@bM47N!>F7M2#)Eo|1VOj<ha)~;+o%nrmH+pS$Wxh4SsIP?ti

delta 53
zcmX@UPW|XQ^@bM47N!>F7M2#)Eo|1V%!x(0(>Ly56PbR?i_M{ZiYprsvjZ{5_9?EM
Hn<oMQAPf`)

diff --git a/configure.ac b/configure.ac
index cccef8af98..fa2441118e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1007,7 +1007,7 @@ AS_CASE([$ocaml_cc_vendor,$host],
[*,x86_64-*-darwin*],
[oc_ldflags='-Wl,-no_compact_unwind';
AC_DEFINE([HAS_ARCH_CODE32], [1])],
- [*,aarch64-*-darwin*|arm64-*-darwin*],
+ [*,aarch64-*-darwin*|*,arm64-*-darwin*],
AC_DEFINE([HAS_ARCH_CODE32], [1]),
[*,*-*-cygwin*],
[common_cppflags="$common_cppflags -U_WIN32"
--
2.43.0

Loading

0 comments on commit b4ae129

Please sign in to comment.