The gnulib will set AC_GNU_SOURCE equivivelant if necessary. The awk is
relevant only for contrib stuff, and compiler program was something I had
not understood quite right some years ago when I added it.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The counting of total maximum address space seems to be broken at the
moment, and the check is expected to fail until a counting fix is
available.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The DHCP version is determined according to the first IP address that
appears in the configuration file. Caveat; counters are of native long
type. Since IPv6 address space has 2^128 addresses, they are subject to
overflow.
[Sami Kerola: This commit also fixed a percent sorting bug, which has
been broken always. See changes ret_percent() for the fix.]
CC: LI Zimu <lzm@cernet.edu.cn>
CC: Xing Li <xing@cernet.edu.cn>
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Cheer Xiao <xiaqqaix@gmail.com>
I have no idea why that was there. My guess is that I had no idea at the
time I added the line what it does.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Making dhcpd.conf and dhcpd.leases file references being dynamic causes
manual contents being replaced at compile time, so make some other data
items dynamic as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
There were too clever tricks done with first and last. Earlier the aim
was to minimize '<=' and '>=' by fiddling with the numbers at the time
when they were saved. While the program logic seemed to work there were
some off by one mistakes, resulting to a count error. Even worse there
is not even that many of such comparisons, so that one cannot really even
justify added complexity. I really hope this patch is last this kind fix
ever needed.
Reported-by: Cheer Xiao <xiaqqaix@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This will allow nth_field function to begin from first field, and stop
immediately when it ends, which makes function much more simple and quite
a bit quicker.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
At the other day I where wondering why so much time was spent on analysis
function, when I realized regression. At the time uthash was introduced
to the project range sorting got to be dropped, which caused same leases
to be walked in analysis time after time.
Now when the regression is removed, and the test cases run about 28% over
all quicker. The rule of thumb is that the greater the data set the
bigger is the benefit having this fix. My largest test data is now
roughly 35% faster.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add gnulib modules which make sense and remove few. The stuff gnulib
takes care can be dropped from configure.am.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This will mean better portability, and a good reason to get rid of
various portability autotools directives which where part of this
project.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
output.c:819:17: warning: comparison of integers of different signs:
'int' and ' unsigned int' [-Wsign-compare]
for (i = 0; i < num_ranges; i++) {
~ ^ ~~~~~~~~~~
output.c:832:17: warning: comparison of integers of different signs:
'int' and ' unsigned int' [-Wsign-compare]
for (i = 0; i < num_shared_networks; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
Signed-off-by: Sami Kerola <kerolasa@iki.fi>