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

Re: pgevent warnings on mingw

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgevent warnings on mingw
Date: 2009-01-31 23:24:13
Message-ID: e51f66da0901311524i35258013mfb3b5f4c2690edfb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 1/31/09, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> On 1/31/09, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>  > Hiroshi Saito wrote:
>  >  > Hi.
>  >  >
>  >  >>> dllwrap --def pgevent.def -o pgevent.dll pgevent.o pgmsgevent.o
>  >  >>> Warning: resolving _DllUnregisterServer by linking to
>  >  >>> _DllUnregisterServer(at)0
>  >  >>> Use --enable-stdcall-fixup to disable these warnings
>  >  >>> Use --disable-stdcall-fixup to disable these fixups
>  >  >>> Warning: resolving _DllRegisterServer by linking to _DllRegisterServer(at)0
>  >  >>> Warning: resolving _DllUnregisterServer by linking to
>  >  >>> _DllUnregisterServer(at)0
>  >  >>> Use --enable-stdcall-fixup to disable these warnings
>  >  >>> Use --disable-stdcall-fixup to disable these fixups
>  >  >>> Warning: resolving _DllRegisterServer by linking to _DllRegisterServer(at)0
>  >  >>>
>  >  >>> What do we have to do to clean this stuff up?
>  >  >
>  >  > I was solved for Marko-san at the time of the work of pgbouncer, and
>  >  > obtained the solution.
>  >  > The patch is this.
>  >
>  >
>  > This appears to be exactly what you are *not* supposed to do. Which is
>  >  assign an ordinal. See:
>  >  http://msdn.microsoft.com/en-us/library/8e705t74(VS.71).aspx
>
>
> AFAICS by default the mingw assigns the ordinal anyway?
>
>  So whats your point?

FWIW, I experimented with various approaches on DLL generation,
and my theory is now that numeric slot is mandatory for export,
name slot optional.  And what the above link above warns about
is that if you manually assign a numeric slot, you may create gaps in
slot table, thus resulting in larger image.  But this assumes
you already have slots that are manually assigned, which should
not happen with pgevent.dll.

Does it sound sane?

With pgbouncer I used "dlltool --export-all-symbols -A" to generate
the .def file, thus the slots are actually assigned automatically
by dlltool, so no gap problems should arise.  As Postgres does not
generate .def automatically, thus Hiroshi simply posted the resulting
.def file, which should not have gap problems.

But such detailed .def avoids the confusing warnings from dllwrap.
If you are worried about gap problems I suggest instead doing the
same and making the .def file auto-generated.

-- 
marko

ps.  I suggest also tagging the "g_module" as static.

In response to

Responses

pgsql-hackers by date

Next:From: Joshua TolleyDate: 2009-02-01 00:05:23
Subject: Re: adding stuff to parser, question
Previous:From: David E. WheelerDate: 2009-01-31 22:28:15
Subject: LIMIT NULL

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