Bugzilla – Bug 1467
FreeBSD log2() issues
Last modified: 2012-10-29 08:57:53 EDT
Lawrence suggested a patch on the list: http://mailman.isi.edu/pipermail/ns-developers/2012-July/010493.html Assigning to src/spectrum; Nicola may suggest a location for a more general header that can be pulled into files using log2(). For reference, this thread talks about how it was solved on another project: https://github.com/OpenImageIO/oiio/pull/348
one first question: shouldn't this patch replace the existing #ifdef added by Tom with changeset 36d9cc69da14? http://code.nsnam.org/ns-3-dev/annotate/f43017db07ec/src/lte/model/pf-ff-mac-scheduler.cc Maybe the patch is against an older version of ns-3? second question: recently we have been to #include<cmath> following Bug 1276; on freebsd, is log2 absent from cmath as well? as for the location of an eventual general header: putting it in spectrum does not make sense, because the lte files being patched do not inherit the use of log2 from spectrum. I'd rather put the general header in core if you want a general ns-3 wide solution. Otherwise, just let the solution be local.
I'm with Nicola here, perhaps we should introduce src/core/utils and put this into it. Tom, any thoughts?
I suspect that we could have src/core/utils/math.h or src/core/model/math.h. I do not have any strong opinion other than maybe it is a bit extreme to create utils/ for a single file.
(In reply to comment #3) > I suspect that we could have src/core/utils/math.h or src/core/model/math.h. I > do not have any strong opinion other than maybe it is a bit extreme to create > utils/ for a single file. Would be nice to close this out as Dizhi's code depends on it. I guess I would lean towards src/core/model/math.h, which could be moved to a utils/ if utils/ is added in the future.
(In reply to comment #4) > Would be nice to close this out as Dizhi's code depends on it. I guess I would > lean towards src/core/model/math.h, which could be moved to a utils/ if utils/ > is added in the future. +1 This was fixed in author Vedran Miletić <rivanvx@gmail.com> Sat, 01 Sep 2012 20:57:21 +0200 (8 weeks ago) changeset 9063 32755d0516f4 parent 9062 d14e2430213d child 9064 21326214dcd5 by the fix for Bug 1237 - code cleanups related to includes.