Thread: pgsql: Fix compiling errors on Windows platform. Fix wrong usage of

pgsql: Fix compiling errors on Windows platform. Fix wrong usage of

From
Tatsuo Ishii
Date:
Fix compiling errors on Windows platform. Fix wrong usage of
INT64CONST macro. Fix lo_hton64 and lo_ntoh64 not to use int32_t and
uint32_t.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7e2f8ed2b0dcff052b8f06069e2d69f02b774f04

Modified Files
--------------
src/include/storage/large_object.h |    2 +-
src/interfaces/libpq/fe-lobj.c     |   12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)


Re: pgsql: Fix compiling errors on Windows platform. Fix wrong usage of

From
Andrew Dunstan
Date:
On 10/07/2012 10:41 AM, Tatsuo Ishii wrote:
> Fix compiling errors on Windows platform. Fix wrong usage of
> INT64CONST macro. Fix lo_hton64 and lo_ntoh64 not to use int32_t and
> uint32_t.


Are you sure this is going to fix the Windows issues?

On the buildfarm, pitta (gcc) reports:

x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
-I../../../../src/include-I/home/pgrunner/bf/root/HEAD/pgsql.2948/../pgsql/src/include
-I../pgsql/src/include/port/win32-DEXEC_BACKEND  -I/c/prog/mingwdep/include
"-I/home/pgrunner/bf/root/HEAD/pgsql.2948/../pgsql/src/include/port/win32"-DBUILDING_DLL  -c -o inv_api.o
/home/pgrunner/bf/root/HEAD/pgsql.2948/../pgsql/src/backend/storage/large_object/inv_api.c
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.2948/../pgsql/src/backend/storage/large_object/inv_api.c: In
function'inv_seek': 
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.2948/../pgsql/src/backend/storage/large_object/inv_api.c:389:1:
error:'LOBLKSIZELL' undeclared (first use in this function) 

and currawong (MSVC) also says:

"d:\bf\root\HEAD\pgsql.2172\pgsql.sln" (default target) (1) ->
(postgres target) ->
   .\src\backend\storage\large_object\inv_api.c(389): error C2065: 'LOBLKSIZELL' : undeclared identifier

It doesn't appear that this patch will fix that at all.


cheers

andrew


Re: pgsql: Fix compiling errors on Windows platform. Fix wrong usage of

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> Are you sure this is going to fix the Windows issues?

Well, it will fix the 'LOBLKSIZELL' business anyway --- that's coming
from trying to use INT64CONST() on something that's not, um, a constant.

More generally, though, it's glaringly obvious that this patch was never
tested on a 32-bit build.  Somebody had better do that.

            regards, tom lane


Re: pgsql: Fix compiling errors on Windows platform. Fix wrong usage of

From
Tatsuo Ishii
Date:
> More generally, though, it's glaringly obvious that this patch was never
> tested on a 32-bit build.  Somebody had better do that.

Well, I have tested on a 32-bit Linux platform(gcc 4.4.5):
$ uname -a
Linux localhost.localdomain 3.0.38-1vl6 #1 SMP Fri Jul 20 13:41:17 JST 2012 i686 i686 i386 GNU/Linux

Compiled fine and passed all regression tests.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp