Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

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: mingw64-32bitpatch.diff
Description: application/octet-stream (5.4 KB)

In response to


pgsql-hackers by date

Next:From: Kohei KaiGaiDate: 2011-12-03 08:43:27
Subject: Re: Prep object creation hooks, and related sepgsql updates
Previous:From: Kohei KaiGaiDate: 2011-12-03 08:19:25
Subject: Re: [v9.2] Fix Leaky View Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group