Re: ecpg tests make failed on Win32/MinGW

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: William ZHANG <uniware(at)zedware(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecpg tests make failed on Win32/MinGW
Date: 2006-08-10 15:12:52
Message-ID: 44DB4CF4.3060900@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Something must be odd in your environment - we have several Windows
buildfarm members running through on CVS HEAD quite happily.

cheers

andrew

William ZHANG wrote:
> I tested it on the CVS head source.
>
> C:\> ver
>
> Microsoft Windows XP [Version 5.1.2600]
>
> $ uname -a
> MINGW32_NT-5.1 BEAR 1.0.11(0.46/3/2) 2004-04-30 18:55 i686 unknown
>
> $ pwd
> /home/uniware/pgsql/src/interfaces/ecpg/test/sql
>
> $ make
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-
> statement -Wendif-labels -fno-strict-aliasing -g -I./../../include -I../../../.
> ./../src/interfaces/libpq -I../../include -I../../../../../src/include -L../../.
> ./../../src/port -Wl,--allow-multiple-definition -L../../ecpglib -L../../pgtyp
> eslib -L../../../libpq
> func.c -lpgport -lws2_32 -lshfolder -lpgtypes -lecpg -lp
> q -o func
> func.pgc: In function `main':
> func.pgc:18: error: missing terminating " character
> func.pgc:22: error: `BEGIN' undeclared (first use in this function)
> func.pgc:22: error: (Each undeclared identifier is reported only once
> func.pgc:22: error: for each function it appears in.)
> func.pgc:22: error: syntax error before "RAISE"
> func.pgc:22:16: warning: character constant too long for its type
> func.pgc:24: error: `RETURN' undeclared (first use in this function)
> func.pgc:26: error: `END' undeclared (first use in this function)
> func.pgc:26: error: `$test$' undeclared (first use in this function)
> func.pgc:26: error: syntax error before "language"
> func.pgc:26: error: missing terminating " character
> make: *** [func] Error 1
>
> A quick look at C file func.c found that:
>
> 49 #line 16 "func.pgc"
> 50 ^M
> 51 ^M
> 52 { ECPGdo(__LINE__, 0, 1, NULL, "create function My_Table_Check ()
> ret
> urns trigger as $test$^M\
> 53 BEGIN^M\
> 54 RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME,
> TG_WHEN;^M\
> 55 RETURN NEW;^M\
> 56 END; $test$ language plpgsql", ECPGt_EOIT, ECPGt_EORT);
> 57 #line 24 "func.pgc"
> 58
> 59 if (sqlca.sqlwarn[0] == 'W') sqlprint();
> 60 #line 24 "func.pgc"
> 61
> 62 if (sqlca.sqlcode < 0) sqlprint();}
> 63 #line 24 "func.pgc"
>
> There are "^M"s followed by "\". It seems that the "^M"s are generated by
> the lexer/grammer.
> Any one knows the actual cause?
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2006-08-10 15:14:26 Re: Win32 max connections bug (causing crashes)
Previous Message William ZHANG 2006-08-10 15:04:43 ecpg tests make failed on Win32/MinGW