summaryrefslogtreecommitdiff
path: root/vms/vmsish.h
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2016-01-16 12:34:15 -0600
committerCraig A. Berry <craigberry@mac.com>2016-01-16 12:34:15 -0600
commit4f2426499381e5a2089d55fcdd79343019ee0729 (patch)
tree7e6b1882f6a8665ff68c38957b8f924296033810 /vms/vmsish.h
parent0ce92b9f121d1285a80b8a5940423e59c55fd6a8 (diff)
downloadperl-4f2426499381e5a2089d55fcdd79343019ee0729.tar.gz
C99 math under C++ on VMS.
There is a group of math functions prototyped in math.h, but for some reason guarded by an ifdef that makes them visible only under C, not C++. That causes the build to die in the POSIX extension with a lot of undeclared function errors when building with C++. While it's kind of messy to have to maintain a private copy of the prototypes provided by a system-suppled header, it works, and is a lot easier than trying to probe for each one of these in configure.com. So put the relevant prototypes in vmsish.h, make them visible only to C++, and make sure they are within the extern "C" declaration.
Diffstat (limited to 'vms/vmsish.h')
-rw-r--r--vms/vmsish.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/vms/vmsish.h b/vms/vmsish.h
index 407fe6d25d..cf1c9a8552 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -747,6 +747,54 @@ struct passwd * Perl_my_getpwnam (pTHX_ const char *name);
struct passwd * Perl_my_getpwuid (pTHX_ Uid_t uid);
void Perl_my_endpwent (pTHX);
+/*
+ * The following prototypes are in math.h but for some reason they
+ * are ifdefed out for C++. So we have to repeat them here in order
+ * to build the POSIX extension.
+ */
+
+#ifdef __DECCXX
+
+double exp2(double __x);
+double fdim(double __x, double __y);
+double fma(double __x, double __y, double __z);
+double fmax(double __x, double __y);
+double fmin(double __x, double __y);
+double nexttoward(double __x, long double __y);
+double remainder(double __x, double __y);
+double remquo(double __x, double __y, int *__quo);
+double tgamma(double __x);
+float exp2f(float __x);
+float fdimf(float __x, float __y);
+float fmaf(float __x, float __y, float __z);
+float fmaxf(float __x, float __y);
+float fminf(float __x, float __y);
+float nexttowardf(float __x, long double __y);
+float remainderf(float __x, float __y);
+float remquof(float __x, float __y, int *__quo);
+float tgammaf(float __x);
+long double exp2l(long double __x);
+long double fdiml(long double __x, long double __y);
+long double fmal(long double __x, long double __y, long double __z);
+long double fmaxl(long double __x, long double __y);
+long double fminl(long double __x, long double __y);
+long double nexttowardl(long double __x, long double __y);
+long double remainderl(long double __x, long double __y);
+long double remquol(long double __x, long double __y, int *__quo);
+long double tgammal(long double __x);
+int ilogb(double __x);
+int ilogbf(float __x);
+int ilogbl(long double __x);
+long int lrint(double __x);
+long int lrintf(float __x);
+long int lrintl(long double __x);
+long int lround(double __x);
+long int lroundf(float __x);
+long int lroundl(long double __x);
+
+#endif
+
+
#ifdef __cplusplus
}
#endif