Re: [Nagios-devel] Problem compiling nagios 2.3.1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Problem compiling nagios 2.3.1

Post by Guest »

Hi,

CHAR_BIT is also defined in iso/limits_iso.h.

What about a way to include this file if we are on Solaris?

Andrea

Andreas Ericsson wrote:
> Andreas Ericsson wrote:
>> Andrea Gabellini wrote:
>>
>>> Hi,
>>>
>>> I'm using various solaris versions, from 5.7 to 5.10.
>>>
>>> An usable header file is iso/limits_iso.h except for solaris 5.7
>>> where the header fiele is limits.h.
>>>
>>> As a workaround I'm using, in cgi/getcgi.c:
>>>
>>> #ifndef INT_MAX
>>> #define INT_MAX 2147483647
>>> #endif
>>>
>>
>> A more portable way is to write
>>
>> #ifndef CHAR_BIT
>> # define CHAR_BIT 8 /* true for any system created post-woodstock */
>> #endif
>> #ifndef INT_MAX
>> # define INT_MAX (1 > #endif
>>
>
> gaah! dangerous to write code in emails just after lunch.
>
> #define INT_MAX (~(1
> is the correct way. Sorry if I caused any confusion.
>

--

---------------------------------------
How can I miss you if you don't leave ?
---------------------------------------
Ing. Andrea Gabellini
Email: [email protected]
Tel: 0549 886111 (Italy)
Tel. +378 0549 886111 (International)

Telecom Italia San Marino S.p.A.
Strada degli Angariari, 3
47891 Rovereta
Repubblic of San Marino

http://www.omniway.sm http://www.telecomitalia.sm






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked