tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

altq INFINITY



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





Home | Main Index | Thread Index | Old Index