Discussion:
altq INFINITY
(too old to reply)
Iain Hibbert
2010-04-03 19:53:34 UTC
Permalink
Hi,

working with pcc I found that <altq/altq_jobs.h> defines INFINITY as
LLONG_MAX if it is not yet defined. For kernel work, this is perhaps ok,
but this header is exported to userland and it is causing problems
building kdump, ktruss, and altq at least, which end up including <math.h>
afterwards causing a complaint about redefining the symbol (not sure why
gcc doesn't complain)

I think fixes are adding the following to <altq/altq_jobs.h>

+#ifdef _KERNEL
#ifndef INFINITY
#define INFINITY LLONG_MAX
#endif
+#endif

or perhaps changing the altq definition name to something more
appropriate.

or just moving the definition into altq_jobs.c, the only place it is
actually used

or just losing that definition and using UINT64_MAX or INT64_MAX directly
as appropriate

..suggestions?

iain




--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Greg Troxel
2010-04-03 21:48:52 UTC
Permalink
How about you just rename it ALTQ_INFINITY?
That's at least pretty safe, even if it doesn't fix all the ick.

Loading...