Steve Singer ssinger at ca.afilias.info
Sat May 1 14:26:37 PDT 2010
David Fetter wrote:
> Folks,
> 
> Please find enclosed a patch to get Slony 2.0.3 to compile on OS/X :)

When I apply this patch I can no longer compile on linux.
I get the following

gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../.. 
-DPGSHARE="\"/usr/local/pgsql_cvs/share/\"" 
-I/usr/local/pgsql_cvs/include/ -I/usr/local/pgsql_cvs/include/server/ 
-c -o parser.o parser.c
parser.y:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ 
before ‘yyleng’
parser.y: In function ‘yyparse’:
parser.y:374: error: ‘yyleng’ undeclared (first use in this function)
parser.y:374: error: (Each undeclared identifier is reported only once
parser.y:374: error: for each function it appears in.)
make[2]: *** [parser.o] Error 1


The SIZE_T_TYPE macro is not defined,  If your intention is to use 
size_t for yyleng, shouldn't you be using size_t directly?

Also scan.c in the same directory is still referencing yyleng as a int.



> 
> Cheers,
> David.
> 
> 
> ------------------------------------------------------------------------
> 
> Subject:
> slony patch for osx
> From:
> Benjamin Reed <rangerrick at befunk.com>
> Date:
> Fri, 23 Apr 2010 12:01:11 -0400
> To:
> david at fetter.org
> 
> To:
> david at fetter.org
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This is actually mixing 2 things, technically.
> 
> 1) autoconf 2.6 errored out on the AC_DEFINE(FOO) style define, they now
> require you to define a value and description.
> 2) Check for size_t, if it exists, define it to be used in .y files, if
> not, set it to "int" to work the old way.
> 
> The original compile error was:
> 
>> scan.c:161: error: conflicting types for ?yyleng?
>> parser.y:25: error: previous declaration of ?yyleng? was here
> 
> The bison-generated .c file uses yy_size_t which is typedef'd to size_t
> for yyleng.  (an unsigned long).  parser.y from slony uses an int, though.
> 
> Thanks!
> 
> - -- 
> Benjamin Reed a.k.a. Ranger Rick a.k.a. Raccoon Fink
> Fink, KDE, and Mac OS X development
> 
> Blog: http://www.raccoonfink.com/
> Music: http://music.raccoonfink.com/
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.12 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iD8DBQFL0cRHUu+jZtP2Zf4RAsnSAJ4maF/yIT91PJpthfhIu8vrCNReeACdFJ4m
> R3rBemZQat1rugKfwf+kMqM=
> =7d4U
> -----END PGP SIGNATURE-----
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general


-- 
Steve Singer
Afilias Canada
Data Services Developer
416-673-1142


More information about the Slony1-general mailing list