Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

Next:From: Karel ZakDate: 2001-09-08 08:29:39
Subject: Re: CURRENT CVS: MULTIBYTE: CANT CONNECT....
Previous:From: Larry RosenmanDate: 2001-09-08 02:12:18
Subject: Re: CURRENT CVS: MULTIBYTE: CANT CONNECT....

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group