Re: pgevent warnings on mingw - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: pgevent warnings on mingw
Date
Msg-id e51f66da0901311524i35258013mfb3b5f4c2690edfb@mail.gmail.com
Whole thread Raw
In response to Re: pgevent warnings on mingw  (Marko Kreen <markokr@gmail.com>)
List pgsql-hackers
On 1/31/09, Marko Kreen <markokr@gmail.com> wrote:
> On 1/31/09, Magnus Hagander <magnus@hagander.net> wrote:
>  > Hiroshi Saito wrote:
>  >  > Hi.
>  >  >
>  >  >>> dllwrap --def pgevent.def -o pgevent.dll pgevent.o pgmsgevent.o
>  >  >>> Warning: resolving _DllUnregisterServer by linking to
>  >  >>> _DllUnregisterServer@0
>  >  >>> Use --enable-stdcall-fixup to disable these warnings
>  >  >>> Use --disable-stdcall-fixup to disable these fixups
>  >  >>> Warning: resolving _DllRegisterServer by linking to _DllRegisterServer@0
>  >  >>> Warning: resolving _DllUnregisterServer by linking to
>  >  >>> _DllUnregisterServer@0
>  >  >>> Use --enable-stdcall-fixup to disable these warnings
>  >  >>> Use --disable-stdcall-fixup to disable these fixups
>  >  >>> Warning: resolving _DllRegisterServer by linking to _DllRegisterServer@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.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: LIMIT NULL
Next
From: Joshua Tolley
Date:
Subject: Re: adding stuff to parser, question