On 1 Jan 2011, at 20:13, Gabriel Dos Reis wrote: > Anyway, I do no believe that the suggestion for ECL to make available
> its binary flavor is equivalent to building and maintaining a database > of all imaginable ABIs and all combinations of processors. I believe Juanjo was referring to the second obvious way to figure out system info from C: conditional compilation. In that case the C code would be sort of like #if defined(linux) ... #else if defined(FreeBSD) ... #else if defined(__HAIKU__) ... #else ... #endif and you have to know the exact symbol used by every supported platform: some are lowercase, some are uppercase and have underscores, etc. Same for system version and architecture. This would be the database Juanjo does not want to build and maintain, and I find that understandable. BTW this is the only way to tell one C compiler from another from 'inside' C that I know of. The first obvious way (for me at least) would be the uname() libc call, but it is more limited and as far as I know is not present on some platforms, so it would require an autoconf test. Figuring out the ILP32/LP64/whatever bit is a matter of comparing sizeof()'s. It is also easy to figure out endianness. This is very simple and portable C code. OTOH configure scripts usually do some or all of these tests. GMP is extremely platform-dependant and surely knows about all this. Extracting the information from there might be easier and more portable. Regards. -DS ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list