From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a77191f3e4e3079e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!attbi_s02.POSTED!53ab2750!not-for-mail From: "Jeff C," Newsgroups: comp.lang.ada References: Subject: Re: trying to call HDF5 from ada -- problems with constants X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s02 1093518035 24.147.74.171 (Thu, 26 Aug 2004 11:00:35 GMT) NNTP-Posting-Date: Thu, 26 Aug 2004 11:00:35 GMT Organization: Comcast Online Date: Thu, 26 Aug 2004 11:00:36 GMT Xref: g2news1.google.com comp.lang.ada:3020 Date: 2004-08-26T11:00:36+00:00 List-Id: "Christopher Broeg" wrote in message news:cgk5i0$cfu$1@fsuj29.rz.uni-jena.de... > What is the standard way to import C constants that are not "constant" > from one run to the next, but derived from some "invisible" library in the > .h files? If they really vary from one run to the next then I think you have no choice but to build bindings to C functions that return them. Alternatively assuming you have enough of the source you could recreate the code that builds the constants via macros from C code. If the constants vary from platform to platform but not run-to-run you can use an approach like AdaSockets does where it builds the ada spec on the fly during the configure step using constants.sh and constants.c (see the Adasockets distribution) http://www.rfc1149.net/devel/adasockets