pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.pl>
To: pgsql-general@postgresql.org
Cc: pgsql-admin@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: problem while compiling user c functions in 7.1beta4
Date: Thu, 22 Feb 2001 08:28:46 +0100
Message-ID: <20010222082845.A1720@depeszws.depesz.pl> (raw)

hi,
i have functin which did compile on 7.0.3 and 7.1beta1, and now it doesn't.
it includes were:

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <postgres.h>

since in 7.1beta4 there is no postgres.h i changed this to:

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <c.h>

all i need this for is to have type declarations, and postgresql versions of
malloc, realloc and free - i.e. i dont use spi.

when compiling i get this errors:
gcc -O2 -Wall -ansi -I "/home/users/pgdba/work/include/postgresql/" -c dfti.c
-fpic
In file included from dfti.c:4:
/home/users/pgdba/work/include/postgresql/c.h:312: parse error before `regproc'
/home/users/pgdba/work/include/postgresql/c.h:312: warning: type defaults to `int' in declaration of `regproc'
/home/users/pgdba/work/include/postgresql/c.h:312: warning: data definition has no type or storage class
/home/users/pgdba/work/include/postgresql/c.h:313: parse error before `RegProcedure'
/home/users/pgdba/work/include/postgresql/c.h:313: warning: type defaults to `int' in declaration of `RegProcedure'
/home/users/pgdba/work/include/postgresql/c.h:313: warning: data definition has no type or storage class
/home/users/pgdba/work/include/postgresql/c.h:364: parse error before `oidvector'
/home/users/pgdba/work/include/postgresql/c.h:364: warning: type defaults to `int' in declaration of `oidvector'
/home/users/pgdba/work/include/postgresql/c.h:364: warning: data definition has no type or storage class
/home/users/pgdba/work/include/postgresql/c.h:373: `NAMEDATALEN' undeclared here (not in a function)
dfti.c: In function `empty_text':
dfti.c:16: warning: implicit declaration of function `palloc'
dfti.c: In function `dfti_prepare':
dfti.c:37: warning: implicit declaration of function `elog'
dfti.c:37: `ERROR' undeclared (first use in this function)
dfti.c:37: (Each undeclared identifier is reported only once
dfti.c:37: for each function it appears in.)
dfti.c:84: warning: implicit declaration of function `repalloc'
dfti.c:86: warning: implicit declaration of function `pfree'

my knowledge of c is extremly limited, so i can't work on those errors. 
my postgresql is build from cvs snapshot taken 21th of february 11:23.

can anyone help me with this?

depesz

p.s. i'm not posting the whole function code since it's ugly, long and it *did*
work (without warnings) with previous persions.

-- 
hubert depesz lubaczewski                          http://www.depesz.pl/
------------------------------------------------------------------------
     najwspanialszą rzeczą jaką dało nam nowoczesne społeczeństwo,
      jest niesamowita wręcz łatwość unikania kontaktów z nim ...



view thread (6+ messages)  latest in thread

Message-ID: <20010222082845.A1720@depeszws.depesz.pl>
Permalink:  ../20010222082845.A1720@depeszws.depesz.pl/
Also on:    postgresql.org/message-id/20010222082845.A1720@depeszws.depesz.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: depesz@depesz.pl, pgsql-general@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: problem while compiling user c functions in 7.1beta4
  In-Reply-To: <20010222082845.A1720@depeszws.depesz.pl>
  References: <20010222082845.A1720@depeszws.depesz.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox