Original bug ID: 6517 Reporter: Richard Jones Status: closed (set by @xavierleroy on 2016-12-07T10:34:40Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.0+beta1 / +rc1 Target version: 4.03.0+dev / +beta1 Fixed in version: 4.03.0+dev / +beta1 Category: runtime system and C interface Related to:#4164#4877 Monitored by:@hcarty
Headers like <caml/config.h> define a number of types without
a caml_ prefix. Unfortunately these types have very generic names
like "int64" which clash with other headers which also define these
As an example it is not possible to combine the headers:
which currently causes compilation problems in camlimages.
I agree that we should change int32, uint32, int64 and uint64 to their C99 equivalents (with the usual hacks for MSVC). I'm afraid we have to live with the other types for backward compatibility: changing e.g. "value" would break a zillion Caml-C stub codes.
The change still breaks Caml-C stub around. For instance, in camlzip, there is a reference to uint32 which needs to be changed to uint32_t. OPAM will hopefully allow us to identify quickly all packages that need to be updated.
Yup a few packages need updating. Fedora has integrated this patch into our OCaml 4.02.0 release, and have patched a few packages as a result. I've sent the patches upstream, where I can easily find an upstream contact, but you can also check our git repo for each package, eg: