Skip to content

Commit

Permalink
Fix to Solaris build problem re quiet_nan (use long in signature)
Browse files Browse the repository at this point in the history
The quiet_nan() function on Solaris has the signature:

    double quiet_nan(long n);

and this adds a define to set the `long` parameter in the function
prototype and function definition.

It appears that the logic is already in the code,
just that the NANARG determined in mconf.h was not
used to declare the local quiet_nan version.
  • Loading branch information
devel-chm authored and zmughal committed Aug 11, 2015
1 parent e9e7bfa commit 6a320a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Basic/Math/mconf.h
Expand Up @@ -86,13 +86,15 @@ Copyright 1984, 1987, 1989, 1995 by Stephen L. Moshier
#include <ieeefp.h>
#include <float.h>
#define NANARG 1L
#define NANARG_SIGNATURE long n
#endif
#if defined __alpha && ! defined __linux
#include <float.h>
#include <nan.h>
#endif
#ifndef NANARG
#define NANARG
#define NANARG_SIGNATURE
#endif

/* Redefine nan so PDL doesn't die when we see one.
Expand Down Expand Up @@ -154,7 +156,7 @@ int mtherr();
extern int merror;

#ifdef MY_QUIET_NAN
extern double quiet_nan();
extern double quiet_nan(NANARG_SIGNATURE);
#endif
#ifdef MY_INFINITY
extern double infinity();
Expand Down
2 changes: 1 addition & 1 deletion Basic/Math/quiet_nan.c
@@ -1,6 +1,6 @@
#include "mconf.h"
/* Patch NaN function where no system NaN is available */
double quiet_nan(void)
double quiet_nan(NANARG_SIGNATURE)
{
#ifdef NaN
double a;
Expand Down

0 comments on commit 6a320a2

Please sign in to comment.