Web lists-archives.com

compile problem on older program




Hello,

I need to compile an older program and have a compile error. How can I resolve this? Unfortunately I am not a C programmer although I do assembler programming.

Here is the output of make:

making all in ./src...
make[1]: Entering directory '/opt/pcb-1.6.3p/src'
gcc -m32 -g -O2 -fno-strict-aliasing -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -DRELEASE=\"1.6.3\" -DPCBLIBDIR=\"/home/cad/lib/pcb\" -DBTNMOD=\"Mod1\" -DFONTFILENAME=\"default_font\" -DLIBRARYFILENAME=\"pcblib\" -DGNUM4=\"/usr/bin/m4\" -DHAS_ATEXIT -DHAS_REGEX -c -o dev_rs274x.o dev_rs274x.c
dev_rs274x.c: In function ‘GBX_PrintPolygon’:
dev_rs274x.c:821:13: error: invalid storage class for function ‘isRectangle’
  static int isRectangle(PolygonTypePtr Ptr);
             ^
<builtin>: recipe for target 'dev_rs274x.o' failed
make[1]: *** [dev_rs274x.o] Error 1
make[1]: Leaving directory '/opt/pcb-1.6.3p/src'
Makefile:1071: recipe for target 'all' failed
make: *** [all] Error 2


The source:

/* ----------------------------------------------------------------------
 * Checks a four-point polygon to see if it's a rectangle.
 * Tick off pairs of X & Y coords; if we get four matches,
 * we have a rectangle.
 */
static int isRectangle(PolygonTypePtr Ptr)
{
    Cardinal i, j;
    int matches = 0;

        if (Ptr->PointN != 4)
       return(0);

        for (i=0; i<4; i++)
           for (j = i+1; j<4; j++) {
          if (Ptr->Points[i].X == Ptr->Points[j].X)
             matches++;

          if (Ptr->Points[i].Y == Ptr->Points[j].Y)
             matches++;
       }

        if (matches == 4)
       return(1);
    else
       return(0);
 }


I am using Jessie.
Best regards,
Fred Boatwright