<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I was working on the 0.9.0 release and not on the CVS tree.<br>
<br>
I try to compile the HEAD branch and i found this errors :<br>
- lwgeom/lwgeom.c line 369 : I move the declaration of ret at the
beginning<br>
- lwgeom/wktunparse.c line 255 : I move the declaration of writeM
before dims = TYPE_NDIMS(type);<br>
- postgis_geos_version.h is not created by the makefile, I call
geos_version.sh from the shell<br>
<br>
I stop on  : <br>
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -g
-fexceptions -I. -DFRONTEND -DSYSCONFDIR='"/etc/postgresql"' 
-DUSE_VERSION=72 -DPOSTGIS_LIB_VERSION='"1.0.0"'
-DPOSTGIS_SCRIPTS_VERSION='"0.1.0"' -I/usr/local/include -DUSE_GEOS
-I/usr/include -DUSE_PROJ  -DUSE_STATS -fpic
-I/usr/src/postgresql/postgresql-7.2.1/contrib/postgis/../../src/include  
-c -o lwgparse.o lwgparse.c<br>
lwgparse.c:67: warning: unnamed struct/union that defines no instances<br>
lwgparse.c:68: warning: unnamed struct/union that defines no instances<br>
lwgparse.c: In function `inc_num':<br>
lwgparse.c:233: structure has no member named `num'<br>
lwgparse.c: In function `alloc_stack_tuple':<br>
lwgparse.c:246: structure has no member named `stack_next'<br>
lwgparse.c:247: structure has no member named `type'<br>
lwgparse.c:248: structure has no member named `size_here'<br>
lwgparse.c:249: structure has no member named `num'<br>
lwgparse.c: In function `pop':<br>
lwgparse.c:256: structure has no member named `stack_next'<br>
lwgparse.c: In function `popc':<br>
lwgparse.c:262: structure has no member named `num'<br>
lwgparse.c:265: structure has no member named `stack_next'<br>
lwgparse.c: In function `write_point_2':<br>
lwgparse.c:372: structure has no member named `points'<br>
lwgparse.c: In function `write_point_3':<br>
lwgparse.c:378: structure has no member named `points'<br>
lwgparse.c: In function `write_point_4':<br>
lwgparse.c:384: structure has no member named `points'<br>
lwgparse.c: In function `write_point_2i':<br>
lwgparse.c:390: structure has no member named `points'<br>
lwgparse.c: In function `write_point_3i':<br>
lwgparse.c:396: structure has no member named `points'<br>
lwgparse.c: In function `write_point_4i':<br>
lwgparse.c:402: structure has no member named `points'<br>
lwgparse.c: In function `alloc_point_2d':<br>
lwgparse.c:409: structure has no member named `points'<br>
lwgparse.c:410: structure has no member named `points'<br>
lwgparse.c: In function `alloc_point_3d':<br>
lwgparse.c:419: structure has no member named `points'<br>
lwgparse.c:420: structure has no member named `points'<br>
lwgparse.c:421: structure has no member named `points'<br>
lwgparse.c: In function `alloc_point_4d':<br>
lwgparse.c:430: structure has no member named `points'<br>
lwgparse.c:431: structure has no member named `points'<br>
lwgparse.c:432: structure has no member named `points'<br>
lwgparse.c:433: structure has no member named `points'<br>
lwgparse.c: In function `write_type':<br>
lwgparse.c:444: structure has no member named `type'<br>
lwgparse.c:445: structure has no member named `type'<br>
lwgparse.c:447: structure has no member named `type'<br>
lwgparse.c: In function `write_count':<br>
lwgparse.c:471: structure has no member named `num'<br>
lwgparse.c: In function `alloc_empty':<br>
lwgparse.c:550: structure has no member named `type'<br>
lwgparse.c:551: structure has no member named `stack_next'<br>
lwgparse.c:560: structure has no member named `size_here'<br>
lwgparse.c:563: structure has no member named `type'<br>
lwgparse.c:564: structure has no member named `type'<br>
lwgparse.c:567: structure has no member named `size_here'<br>
lwgparse.c:570: structure has no member named `num'<br>
lwgparse.c: In function `read_wkb_point':<br>
lwgparse.c:704: structure has no member named `pointsi'<br>
lwgparse.c:717: structure has no member named `points'<br>
lwgparse.c: In function `parse_it':<br>
lwgparse.c:862: warning: implicit declaration of function
`lwg_parse_yyparse'<br>
make[1]: *** [lwgparse.o] Error 1<br>
make[1]: Leaving directory
`/usr/src/postgresql/postgresql-7.2.1/contrib/postgis/lwgeom'<br>
make: *** [liblwgeom] Error 2<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:strk@refractions.net">strk@refractions.net</a> wrote:
<blockquote cite="mid20041021171658.GA12907@freek.keybit.net"
 type="cite">
  <pre wrap="">Sebastien, current HEAD contains the following lines
in lwgeom_pg.h:

#ifndef PG_NARGS
#define PG_NARGS() (fcinfo->nargs)
#endif

Doesn't this work for you ?
--strk;

On Thu, Oct 21, 2004 at 07:16:14PM +0200, Sébastien NICAISE wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://postgis.refractions.net/pipermail/postgis-users/2003-August/002945.html">http://postgis.refractions.net/pipermail/postgis-users/2003-August/002945.html</a> 
:
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">PG_NARGS is not defined in fmgr.h < 7.3
It is used with no check in postgis_inout.c (multiple times)

All checks can be substituted with the macro
PG_ARGISNULL() available also on the older pgres versions.
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">Here is the patch for file : lwgeom_inout.c lwgeom_ogc.c postgis_svg.c

Sebastien N.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">diff -aurN postgis-0.9.0/lwgeom/lwgeom_inout.c postgis-0.9.0.seb/lwgeom/lwgeom_inout.c
--- postgis-0.9.0/lwgeom/lwgeom_inout.c Fri Sep 10 09:36:25 2004
+++ postgis-0.9.0.seb/lwgeom/lwgeom_inout.c     Thu Oct 21 18:34:22 2004
@@ -141,7 +141,7 @@
 
        wkb_input = (WellKnownBinary *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
 
-       if (  ( PG_NARGS()>1) && ( ! PG_ARGISNULL(1) ))
+       if (!PG_ARGISNULL (1))
                SRID = PG_GETARG_INT32(1);
        else
                SRID = -1;
diff -aurN postgis-0.9.0/lwgeom/lwgeom_ogc.c postgis-0.9.0.seb/lwgeom/lwgeom_ogc.c
--- postgis-0.9.0/lwgeom/lwgeom_ogc.c   Wed Sep  8 12:25:26 2004
+++ postgis-0.9.0.seb/lwgeom/lwgeom_ogc.c       Thu Oct 21 18:35:00 2004
@@ -689,7 +689,7 @@
        LWGEOM *result = NULL;
 
        // read user-requested SRID if any
-       if ( PG_NARGS() > 1 )
+       if (!PG_ARGISNULL (1))
        {
                SRID = PG_GETARG_INT32(1);
                if ( SRID != lwgeom_getSRID(geom) )
diff -aurN postgis-0.9.0/postgis_svg.c postgis-0.9.0.seb/postgis_svg.c
--- postgis-0.9.0/postgis_svg.c Fri Sep 10 18:16:31 2004
+++ postgis-0.9.0.seb/postgis_svg.c     Thu Oct 21 18:39:54 2004
@@ -55,10 +55,10 @@
        geom1 = (GEOMETRY *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
 
        // check for relative path notation
-       if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) )
+       if (! PG_ARGISNULL(1))
                        svgrel = PG_GETARG_INT32(1);
 
-       if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) )
+       if (! PG_ARGISNULL(2))
                precision = PG_GETARG_INT32(2);
                
        wkt = geometry_to_svg(geom1, svgrel, precision);
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">_______________________________________________
postgis-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
postgis-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a>



  </pre>
</blockquote>
</body>
</html>