Closed cfcs closed 4 years ago
@cfcs
i am not sure, i haven't seen any problems using ocaml-freestanding, but if you have tested it and are happy with the results, make the change.
I am sorry i can not volunteer to test and make the fix, life circumstances have severely limited my access and time if from of a computer, but please feel free to test and make a change.
I'm not sure what is required here. There was someone on IRC reporting that "it doesn't work with OpenBSD", but did not file an issue or provide details. I do recall that OpenBSD has a different idea of integer/pointer sizes to every other *NIX on amd64.
I'd suggest running the standard OCaml configure
on OpenBSD and comparing the resulting generated files with those in ocaml-freestanding, then reconciling any differences / adding OpenBSD-specific templates if need be.
I don't think this is the cause of that bug report, just noting that it is incorrect, and in theory could lead to truncation or compiler warnings/errors if that macro is used.
In theory, because it would apply on platforms where long
and long long
are not equivalent, which doesn't seem to be the case for any platforms we care about.
Where it could matter is if some compiler decides to get strict about types.
As far as I can tell, this is fixed by #65 which will be in the next release, so closing this issue.
https://github.com/mirage/ocaml-freestanding/blob/master/config.in/m.x86_64.h#L13
I believe this should be included in the
ifdef
guard and be set toll
on openbsd? see https://man.openbsd.org/printf.3ping @adamsteen