Code modernization: Convert from deprecated C standard library headers

This commit is contained in:
Tim Wojtulewicz 2022-06-24 19:36:15 +00:00 committed by Tim Wojtulewicz
parent 823d80494b
commit 7c4fd382d9
104 changed files with 160 additions and 165 deletions

View file

@ -4,10 +4,10 @@
#include "zeek/zeek-config.h"
#include <errno.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <cerrno>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "zeek/3rdparty/ConvertUTF.h"
#include "zeek/File.h"
@ -179,7 +179,7 @@ void ODesc::Add(double d, bool no_exp)
return v < 0 ? -v < tolerance : v < tolerance;
};
if ( approx_equal(d, nearbyint(d), 1e-9) && isfinite(d) && ! strchr(tmp, 'e') )
if ( approx_equal(d, nearbyint(d), 1e-9) && std::isfinite(d) && ! strchr(tmp, 'e') )
// disambiguate from integer
Add(".0");
}