[dev] conflics with libpq

Igor Sysoev is at rambler-co.ru
Sun Sep 16 21:33:54 MSD 2007


On Sun, Sep 16, 2007 at 07:02:55PM +0200, Manlio Perillo wrote:

> Igor Sysoev ha scritto:
> >On Sun, Sep 16, 2007 at 03:31:51PM +0200, Manlio Perillo wrote:
> >
> >>I'm writing an extension module that uses the postgresql library.
> >>I have found that there is a conflict with libpq headers.
> >>
> >>If I include <libpq-fe.h> before nginx headers, then nginx will not work.
> >>
> >>In the request handler, r->method has wrong values
> >>(as an example 1189949249, and it randomly increments by 1) and when I 
> >>use the log functions, I get a SIGIO.
> >>
> >>
> >>If I include nginx headers first, all works fine, but I think that it 
> >>may be interesting to understand why this is happening.
> >
> >If nginx is built on Linux it may be due to
> >
> >#define _FILE_OFFSET_BITS  64
> 
> Yes, I'm un Linux Debian Etch.

All modules are built with _FILE_OFFSET_BITS 64.
Your module with libpq inclusion before nginx headers is built with
_FILE_OFFSET_BITS 32.

By the way how do you use libpq - in blocking on none-blocking mode ?


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list