From: | NISHIYAMA Tomoaki <tomoakin(at)staff(dot)kanazawa-u(dot)ac(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | NISHIYAMA Tomoaki <tomoakin(at)staff(dot)kanazawa-u(dot)ac(dot)jp>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 |
Date: | 2011-12-03 08:24:44 |
Message-ID: | 91BDAB66-3197-4478-A9DF-F7354557E435@staff.kanazawa-u.ac.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
A new patch:
check for the presence of crtdefs.h in configure
-#if _MSC_VER >= 1400 || defined(WIN64)
+#if _MSC_VER >= 1400 || HAVE_CRTDEFS_H
#define errcode __msvc_errcode
#include <crtdefs.h>
#undef errcode
Perhaps there is no guarantee that mingw (not -w64) may not have crtdefs.h in the future versions.
the 3 lines
#define errcode __msvc_errcode
#include <crtdefs.h>
#undef errcode
should be valid as far as crtdefs.h exists and errcode is not defined previously.
Because this is the first system include file, we can be sure errcode is not
defined by this point.
So, I believe its better to just test for the presence of crtdefs.h rather than
try to figure out the name of compiler.
check for fseeko and ftello macro definition before defining to avoid
warning in mingw-w64 4.7.0 20110827
This patch was tested to build successfully on
mingw gcc version 4.6.1
mingw-w64 i686-w64-mingw32 gcc version 4.5.4 20110812
mingw-w64 x86_64-w64-mingw32 gcc version 4.7.0 20110827
Attachment | Content-Type | Size |
---|---|---|
mingw64-32bitpatch.diff | application/octet-stream | 5.4 KB |
unknown_filename | text/plain | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kohei KaiGai | 2011-12-03 08:43:27 | Re: Prep object creation hooks, and related sepgsql updates |
Previous Message | Kohei KaiGai | 2011-12-03 08:19:25 | Re: [v9.2] Fix Leaky View Problem |