PostgreSQL 7.1.3 vs. gcc 2.95.4 and GNU libc 2.2.4

From: tomas(at)fabula(dot)de
To: pgsql-bugs(at)postgresql(dot)org
Subject: PostgreSQL 7.1.3 vs. gcc 2.95.4 and GNU libc 2.2.4
Date: 2001-09-08 06:55:36
Message-ID: 20010908085536.C25921@www
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

trying to compile PostgreSQL 7.1.3 (my system: Linux Debian-ish,
fairly new Gnu libc (where I think the problem resides):
gcc 2.95.4 and GNU libc 2.2.4 bails out at:

| input.c: In function `initializeInput':
| input.c:157: warning: passing arg 1 of `on_exit' from incompatible pointer type
| input.c:157: too few arguments to function `on_exit'
| make[3]: *** [input.o] Error 1
| make[3]: Leaving directory `/usr/local/src/postgresql-7.1.3/src/bin/psql'
| make[2]: *** [all] Error 2

Here's input.c around line 157:

| #ifdef HAVE_ATEXIT
| atexit(finishInput);
| #else
| on_exit(finishInput);
| #endif

and here's the prototype from my man(3) on_exit:

| int on_exit(void (*function)(int , void *), void *arg);

Modifying the call in input.c in the obvious way(1) solves the problem
for me, but I'm not an Autoconfiguru and besides I have no clue about
how portable or universal on_exit() is -- so I have no intelligent
patch to submit (I'd like to).

---
(1) on_exit(finishInput, NULL); it complains about incompatible pointer
type, because of the different function prototype of finishInput, but
it works.

Cheers
-- tomas

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Karel Zak 2001-09-08 08:29:39 Re: CURRENT CVS: MULTIBYTE: CANT CONNECT....
Previous Message Larry Rosenman 2001-09-08 02:12:18 Re: CURRENT CVS: MULTIBYTE: CANT CONNECT....