-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
host_endian appears to be broken #72
Labels
Comments
Interesting, I didn't know this feature was supposed to exist ;) but it's clearly in the camlp4 and ppx. |
haesbaert
added a commit
to haesbaert/ocaml-cstruct
that referenced
this issue
Feb 28, 2022
This addresses issue mirage#72, basically host endianness means "don't swap" for cstruct, so it's pretty straightforward. With this I can successfully use the following code on haesbaert/rawlink: [%%cstruct type bpf_hdr = { bh_sec: uint32_t; bh_usec: uint32_t; bh_caplen: uint32_t; bh_datalen: uint32_t; bh_hdrlen: uint16_t; } [@@host_endian]]
haesbaert
added a commit
to haesbaert/ocaml-cstruct
that referenced
this issue
Feb 28, 2022
This addresses issue mirage#72, basically host endianness means "don't swap" for cstruct, so it's pretty straightforward. With this I can successfully use the following code on haesbaert/rawlink: [%%cstruct type bpf_hdr = { bh_sec: uint32_t; bh_usec: uint32_t; bh_caplen: uint32_t; bh_datalen: uint32_t; bh_hdrlen: uint16_t; } [@@host_endian]]
Solved in 9569a8a |
hannesm
added a commit
to hannesm/opam-repository
that referenced
this issue
Mar 29, 2022
…ct-lwt and cstruct-async (6.1.0) CHANGES: **breaking changes** - The deprecated functions `Cstruct.len`, `Cstruct.add_len`, `Cstruct.set_len`, and `Cstruct.blit_to_string` have been removed (@hannesm mirage/ocaml-cstruct#291) - Implement host_endian (@haesbaert mirage/ocaml-cstruct#292, fixes mirage/ocaml-cstruct#72) - Compatibility with OCaml 5.0.0 (@dinosaure mirage/ocaml-cstruct#294) - Drop support of OCaml < 4.08.0, remove bigarray-compat dependency (@hannesm mirage/ocaml-cstruct#298) - Fix year in chages (@reynir mirage/ocaml-cstruct#297)
hannesm
added a commit
to hannesm/opam-repository
that referenced
this issue
Mar 31, 2022
…ct-lwt and cstruct-async (6.1.0) CHANGES: **breaking changes** - The deprecated functions `Cstruct.len`, `Cstruct.add_len`, `Cstruct.set_len`, and `Cstruct.blit_to_string` have been removed (@hannesm mirage/ocaml-cstruct#291) - Implement host_endian (@haesbaert mirage/ocaml-cstruct#292, fixes mirage/ocaml-cstruct#72) - Compatibility with OCaml 5.0.0 (@dinosaure mirage/ocaml-cstruct#294) - Drop support of OCaml < 4.08.0, remove bigarray-compat dependency (@hannesm mirage/ocaml-cstruct#298) - Fix year in chages (@reynir mirage/ocaml-cstruct#297)
hannesm
added a commit
to hannesm/opam-repository
that referenced
this issue
Mar 31, 2022
…ct-lwt and cstruct-async (6.1.0) CHANGES: **breaking changes** - The deprecated functions `Cstruct.len`, `Cstruct.add_len`, `Cstruct.set_len`, and `Cstruct.blit_to_string` have been removed (@hannesm mirage/ocaml-cstruct#291) - Implement host_endian (@haesbaert mirage/ocaml-cstruct#292, fixes mirage/ocaml-cstruct#72) - Compatibility with OCaml 5.0.0 (@dinosaure mirage/ocaml-cstruct#294) - Drop support of OCaml < 4.08.0, remove bigarray-compat dependency (@hannesm mirage/ocaml-cstruct#298) - Fix year in chages (@reynir mirage/ocaml-cstruct#297)
hannesm
added a commit
to hannesm/opam-repository
that referenced
this issue
Mar 31, 2022
…ct-lwt and cstruct-async (6.1.0) CHANGES: **breaking changes** - The deprecated functions `Cstruct.len`, `Cstruct.add_len`, `Cstruct.set_len`, and `Cstruct.blit_to_string` have been removed (@hannesm mirage/ocaml-cstruct#291) - Implement host_endian (@haesbaert mirage/ocaml-cstruct#292, fixes mirage/ocaml-cstruct#72) - Compatibility with OCaml 5.0.0 (@dinosaure mirage/ocaml-cstruct#294) - Drop support of OCaml < 4.08.0, remove bigarray-compat dependency (@hannesm mirage/ocaml-cstruct#298) - Fix year in chages (@reynir mirage/ocaml-cstruct#297)
hannesm
added a commit
to hannesm/opam-repository
that referenced
this issue
Apr 1, 2022
…ct-lwt and cstruct-async (6.1.0) CHANGES: **breaking changes** - The deprecated functions `Cstruct.len`, `Cstruct.add_len`, `Cstruct.set_len`, and `Cstruct.blit_to_string` have been removed (@hannesm mirage/ocaml-cstruct#291) - Implement host_endian (@haesbaert mirage/ocaml-cstruct#292, fixes mirage/ocaml-cstruct#72) - Compatibility with OCaml 5.0.0 (@dinosaure mirage/ocaml-cstruct#294) - Drop support of OCaml < 4.08.0, remove bigarray-compat dependency (@hannesm mirage/ocaml-cstruct#298) - Fix year in changes of 6.0.1 (@reynir mirage/ocaml-cstruct#297)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fails to find Cstruct.HE while little_endian and big_endian work fine:
Error: Unbound module Cstruct.HE
OS X with ocaml 4.02.3
The text was updated successfully, but these errors were encountered: