On 1/31/09, Marko Kreen <mark...@gmail.com> wrote: > On 1/31/09, Magnus Hagander <mag...@hagander.net> wrote: > > Hiroshi Saito wrote: > > > Hi. > > > > > >>> dllwrap --def pgevent.def -o pgevent.dll pgevent.o pgmsgevent.o > > >>> Warning: resolving _DllUnregisterServer by linking to > > >>> _dllunregisterser...@0 > > >>> Use --enable-stdcall-fixup to disable these warnings > > >>> Use --disable-stdcall-fixup to disable these fixups > > >>> Warning: resolving _DllRegisterServer by linking to > _dllregisterser...@0 > > >>> Warning: resolving _DllUnregisterServer by linking to > > >>> _dllunregisterser...@0 > > >>> Use --enable-stdcall-fixup to disable these warnings > > >>> Use --disable-stdcall-fixup to disable these fixups > > >>> Warning: resolving _DllRegisterServer by linking to > _dllregisterser...@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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers