[csw-maintainers] #ifdef's for solaris versions

Dagobert Michelsen dam at opencsw.org
Mon Sep 9 08:48:09 CEST 2013

Hi Riccardo,

Am 08.09.2013 um 21:32 schrieb Riccardo Mottola <rmottola at opencsw.org>:
> On 09/07/13 17:57, Maciej (Matchek) Bliziński wrote:
>> 2013/9/7 Riccardo Mottola <rmottola at opencsw.org>
>>> Are there reliable #ifdef's for identifying solaris? and then, in case, its versions? I need certain  workaround for solaris and, furthermore some are needed only for solaris 8/9, but no longer in 10+. (I'm struggling with the missing stdint.h and the incomplete inttypes.h)
>> Why not have a ./configure test for the exact feature or bug you're
>> interested in detecting, and an own #define?
> First, not everything is easy to check, also these tests need to work on non-solaris platforms. Perhaps you do have some ready tests?
> The first problem is checking for stdint.h: that's easy, the alternative is inttypes. But then checking for various macros, some of those are defined "blank" on solaris 8/9, not just undefined. (MIN/MAX limits, PRTuPTR and that kind of stuff).

I suggest seeking inspiration from other portable projects like vlc, rdesktop or mpg123.

Apart from that I guess 'host' in autoconf is what you are looking for:

Best regards

  -- Dago

"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2351 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20130909/b127f7aa/attachment.p7s>

More information about the maintainers mailing list