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
C includes don't provide a revision number #5666
Comments
Comment author: @damiendoligez Instead of providing a C include file, which would only work for future versions of OCaml, I wrote a shell script that produces such an include file from the version number provided by ocamlc. I suggest that you include a copy of that script with your sources and use it in your Makefile. I have uploaded it here, and added it to the tools/ directory. Sample output: for 4.00.0+beta2: for 3.12.1: for 3.07: |
Comment author: @ygrek Adding a C include file would still be useful.. |
Comment author: @oandrieu « (one more field in the custom_operations struct) » Actually this field was introduced in 3.12.1 |
Comment author: didc My bad, I had ver. 3.11 and tried ver. 4 and assumed it was new. If it's the only thing that changed since then, it's probably not so much of a hurdle. |
Original bug ID: 5666
Reporter: didc
Status: closed (set by @xavierleroy on 2015-12-11T18:07:11Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.00.0+beta2/+rc1
Fixed in version: 4.00.0+dev
Category: configure and build/install
Monitored by: @ygrek @hcarty
Bug description
Hi,
I am planning to include support for both 3.x and 4.x versions of the C API in the C stub parts of my libraries. However, I couldn't find a define in the C headers to verify which version of the runtime I'm compiling against. There's at least one change in the C API (one more field in the custom_operations struct), which can be easily tested without this feature, but I wonder if a more general way of checking the API version wouldn't be desirable.
Thank you!!
File attachments
The text was updated successfully, but these errors were encountered: