pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedBuild broken since 9aaa062 because of missing isnan and isinf
5+ messages / 3 participants
[nested] [flat]
* Build broken since 9aaa062 because of missing isnan and isinf
@ 2015-01-29 04:27 Michael Paquier <michael.paquier@gmail.com>
2015-01-29 11:34 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2015-01-29 04:27 UTC (permalink / raw)
To: pgsql-odbc
Hi,
As mentioned in $subject, build of regression tests is broken on
Windows as follows:
.\src\common.obj
result-conversions-test.obj : error LNK2019: unresolved external
symbol isinf referenced in function printdouble
result-conversions-test.obj : error LNK2019: unresolved external
symbol isnan referenced in function printdouble
.\src\result-conversions-test.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\Bin\amd64\cl.EXE"' : return code '0x2'
Stop.
I think that we are going to need something like the patch attached to
define explicitly isnan and isinf.
Regards,
--
Michael
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
20150129_pgodbc_fix_isnan.patch (text/x-diff, 508B) download
diff --git a/test/src/result-conversions-test.c b/test/src/result-conversions-test.c
index 2dc5d9a..9da6d09 100644
--- a/test/src/result-conversions-test.c
+++ b/test/src/result-conversions-test.c
@@ -7,8 +7,18 @@
#include <ctype.h>
#include <math.h>
+#ifdef WIN32
+#include <float.h>
+#endif
+
#include "common.h"
+#ifdef WIN32
+#define isnan(x) _isnan(x)
+#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || \
+ (_fpclass(x) == _FPCLASS_NINF))
+#endif
+
static const char *pgtypes[] =
{
/*
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Build broken since 9aaa062 because of missing isnan and isinf
2015-01-29 04:27 Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
@ 2015-01-29 11:34 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 11:51 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Heikki Linnakangas @ 2015-01-29 11:34 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; pgsql-odbc
On 01/29/2015 06:27 AM, Michael Paquier wrote:
> Hi,
>
> As mentioned in $subject, build of regression tests is broken on
> Windows as follows:
> .\src\common.obj
> result-conversions-test.obj : error LNK2019: unresolved external
> symbol isinf referenced in function printdouble
> result-conversions-test.obj : error LNK2019: unresolved external
> symbol isnan referenced in function printdouble
> .\src\result-conversions-test.exe : fatal error LNK1120: 2 unresolved externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
> \VC\Bin\amd64\cl.EXE"' : return code '0x2'
> Stop.
> I think that we are going to need something like the patch attached to
> define explicitly isnan and isinf.
Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those
macros, but it actually worked on my Windows system. Maybe they've added
them to the MSVC headers recently...
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Build broken since 9aaa062 because of missing isnan and isinf
2015-01-29 04:27 Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
2015-01-29 11:34 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2015-01-29 11:51 ` Michael Paquier <michael.paquier@gmail.com>
2015-01-29 12:53 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2015-01-29 11:51 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: pgsql-odbc
On Thu, Jan 29, 2015 at 8:34 PM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
> Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those
> macros, but it actually worked on my Windows system. Maybe they've added
> them to the MSVC headers recently...
Yes, they have been added in MS 2013. I think that my patch is
actually a bit wrong, we may want to use _MSC_VER < 1800 as well.
--
Michael
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Build broken since 9aaa062 because of missing isnan and isinf
2015-01-29 04:27 Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
2015-01-29 11:34 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 11:51 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
@ 2015-01-29 12:53 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 15:29 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Heikki Linnakangas @ 2015-01-29 12:53 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc
On 01/29/2015 01:51 PM, Michael Paquier wrote:
> On Thu, Jan 29, 2015 at 8:34 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those
>> macros, but it actually worked on my Windows system. Maybe they've added
>> them to the MSVC headers recently...
> Yes, they have been added in MS 2013. I think that my patch is
> actually a bit wrong, we may want to use _MSC_VER < 1800 as well.
Good point. I'm seeing a compiler warning on my system now, about
redefining isnan and isinf. I rewrote the #ifdef as:
#if defined(WIN32) && !defined(isnan)
That seems to fix the warnings.
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Build broken since 9aaa062 because of missing isnan and isinf
2015-01-29 04:27 Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
2015-01-29 11:34 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 11:51 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
2015-01-29 12:53 ` Re: Build broken since 9aaa062 because of missing isnan and isinf Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2015-01-29 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2015-01-29 15:29 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: Michael Paquier <michael.paquier@gmail.com>; pgsql-odbc
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 01/29/2015 01:51 PM, Michael Paquier wrote:
>> Yes, they have been added in MS 2013. I think that my patch is
>> actually a bit wrong, we may want to use _MSC_VER < 1800 as well.
> Good point. I'm seeing a compiler warning on my system now, about
> redefining isnan and isinf. I rewrote the #ifdef as:
You might want to make it match the existing core coding in port/win32.h:
#if (_MSC_VER < 1800)
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
#define isnan(x) _isnan(x)
#endif
That's been through the wars, unlike whatever you just came up with.
regards, tom lane
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2015-01-29 15:29 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 04:27 Build broken since 9aaa062 because of missing isnan and isinf Michael Paquier <michael.paquier@gmail.com>
2015-01-29 11:34 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 11:51 ` Michael Paquier <michael.paquier@gmail.com>
2015-01-29 12:53 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2015-01-29 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox