libcom: properly declare isnan() in C++ code

This commit is contained in:
Ralph Lange
2019-12-11 14:51:16 +01:00
parent 09ec3af337
commit 2e89a60c2d
4 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -13,7 +13,9 @@
#ifndef __EPICS_ALGORITHM_H__
#define __EPICS_ALGORITHM_H__
#include "epicsMath.h"
#include <cmath>
using std::isnan;
// The C++ standard only requires types to be less-than comparable, so
// the epicsMin and epicsMax templates only use operator <
+3
View File
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <cmath>
#define epicsExportSharedSymbols
#include "errlog.h"
@@ -31,6 +32,8 @@
#include "cantProceed.h"
#include "iocsh.h"
using std::isinf;
extern "C" {
/*
+4
View File
@@ -9,11 +9,15 @@
// epicsAlgorithmTest.cpp
// Authors: Jeff Hill & Andrew Johnson
#include <cmath>
#include "epicsUnitTest.h"
#include "epicsAlgorithm.h"
#include "epicsMath.h"
#include "testMain.h"
using std::isnan;
MAIN(epicsAlgorithm)
{
testPlan(22);
+4
View File
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include "epicsUnitTest.h"
#include "epicsTypes.h"
@@ -16,6 +17,9 @@
#include "postfix.h"
#include "testMain.h"
using std::isnan;
using std::isinf;
/* Infrastructure for running tests */
double doCalc(const char *expr) {