[Nagiosplug-devel] check_icmp min and max
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed Oct 29 13:38:00 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 29/10/08 07:59 AM, Andreas Ericsson wrote:
> Thomas Guyot-Sionnest wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 28/10/08 03:02 PM, Andreas Ericsson wrote:
>>> rader at hep.wisc.edu wrote:
>>>> Sure. (I used MAXDOUBLE, da.) Shall I ask a
>>>> Physicist how far across the Universe that'd get us??
>>>>
>>> No need. It's about as far as Marvin walks in the hitchhiker trilogy ;-)
>>>
>>> Thanks for the resend.
>>
>> Do you have commit access or shall I do it for you?
>>
>> And out of curiosity, why not using DBL_MAX instead of defining a new
>> value?
>>
>
> DBL_MAX isn't always defined. Think broken header files here.
> otoh, defining DBL_MAX to something suitably huge if it isn't
> defined would get the best of both worlds.
>
That's what I first though, but gnulib defines LDBL_MAX on some systems
where it's missing, but not DBL_MAX, so my guess was that's it's always
there. Anyways it never hurts to check for that though.
So what about something like that:
@@ -106,6 +106,7 @@
# define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
#endif
+#ifdef DBL_MAX
+# define RTMIN_MAGIC_CONSTANT DBL_MAX
+#else
+# define RTMIN_MAGIC_CONSTANT 9.999999999999999e999
+#endif
typedef unsigned short range_t; /* type for get_range() --
unimplemented */
@@ -120,6 +121,8 @@
Shall I commit his patch for you??
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJCFko6dZ+Kt5BchYRAooSAJ9pg3E0lP4gGZjWoMo27v9hCCrVTACg7Bfm
LulDQn7dwt2ykK84n9DI2ZM=
=57PP
-----END PGP SIGNATURE-----
More information about the Devel
mailing list