forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In some instances, build fails because of a compatibility stanza. Let's just drop it in a patch here and add a lower bound on OCaml. Closes: https://bugs.gentoo.org/748549 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
eb13bb1
commit 34cf79f
Showing
2 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
dev-ml/ocplib-endian/files/ocplib-endian-1.1-fix-build.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Drop old compatibility code which causes a syntax error (sometimes?) | ||
https://bugs.gentoo.org/748549 | ||
--- a/src/endianBytes.cppo.ml | ||
+++ b/src/endianBytes.cppo.ml | ||
@@ -89,26 +89,6 @@ let unsafe_set_char (s:Bytes.t) off v = | ||
|
||
#include "common.ml" | ||
|
||
-#if OCAML_VERSION < (4, 07, 0) | ||
- | ||
-external unsafe_get_16 : Bytes.t -> int -> int = "%caml_string_get16u" | ||
-external unsafe_get_32 : Bytes.t -> int -> int32 = "%caml_string_get32u" | ||
-external unsafe_get_64 : Bytes.t -> int -> int64 = "%caml_string_get64u" | ||
- | ||
-external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16u" | ||
-external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32u" | ||
-external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64u" | ||
- | ||
-external get_16 : Bytes.t -> int -> int = "%caml_string_get16" | ||
-external get_32 : Bytes.t -> int -> int32 = "%caml_string_get32" | ||
-external get_64 : Bytes.t -> int -> int64 = "%caml_string_get64" | ||
- | ||
-external set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16" | ||
-external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32" | ||
-external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64" | ||
- | ||
-#else | ||
- | ||
external unsafe_get_16 : Bytes.t -> int -> int = "%caml_bytes_get16u" | ||
external unsafe_get_32 : Bytes.t -> int -> int32 = "%caml_bytes_get32u" | ||
external unsafe_get_64 : Bytes.t -> int -> int64 = "%caml_bytes_get64u" | ||
@@ -125,6 +105,4 @@ external set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16" | ||
external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32" | ||
external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64" | ||
|
||
-#endif | ||
- | ||
#include "common_401.ml" | ||
--- a/src/endianString.cppo.ml | ||
+++ b/src/endianString.cppo.ml | ||
@@ -93,18 +93,6 @@ external get_16 : string -> int -> int = "%caml_string_get16" | ||
external get_32 : string -> int -> int32 = "%caml_string_get32" | ||
external get_64 : string -> int -> int64 = "%caml_string_get64" | ||
|
||
-#if OCAML_VERSION < (4, 07, 0) | ||
- | ||
-external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16u" | ||
-external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32u" | ||
-external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64u" | ||
- | ||
-external set_16 : Bytes.t -> int -> int -> unit = "%caml_string_set16" | ||
-external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_string_set32" | ||
-external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64" | ||
- | ||
-#else | ||
- | ||
external unsafe_set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16u" | ||
external unsafe_set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32u" | ||
external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64u" | ||
@@ -113,6 +101,4 @@ external set_16 : Bytes.t -> int -> int -> unit = "%caml_bytes_set16" | ||
external set_32 : Bytes.t -> int -> int32 -> unit = "%caml_bytes_set32" | ||
external set_64 : Bytes.t -> int -> int64 -> unit = "%caml_bytes_set64" | ||
|
||
-#endif | ||
- | ||
#include "common_401.ml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters