1234567891011121314151617181920212223242526272829303132333435 |
- This patch fixes GCC6 (C++14) compilation errors. It replaces two invalid macro
- calls with correct code in one place. It also removes redefinitions of fmax and
- fmin functions which exist in standard library since C++11.
- Gentoo-bug: https://bugs.gentoo.org/show_bug.cgi?id=594550
- --- a/testddl.cpp
- +++ b/testddl.cpp
- @@ -102,8 +102,13 @@
-
- REGISTER(Record);
-
- +#if __cplusplus < 201103L
- USER_FUNC(sin);
- USER_FUNC(cos);
- +#else
- +static dbUserFunction fsin_descriptor((double (*)(double))&sin, STRLITERAL("sin"));
- +static dbUserFunction fcos_descriptor((double (*)(double))&cos, STRLITERAL("cos"));
- +#endif
-
- int __cdecl main()
- {
- --- a/testtimeseries.cpp
- +++ b/testtimeseries.cpp
- @@ -47,8 +47,10 @@
- REGISTER(Stock);
-
- inline int random(unsigned mod) { return rand() % mod; }
- +#if __cplusplus < 201103L
- inline float fmax(float x, float y) { return x > y ? x : y; }
- inline float fmin(float x, float y) { return x < y ? x : y; }
- +#endif
-
- int main(int argc, char* argv[])
- {
|