Re: narwhal and PGDLLIMPORT
Marco Atzeri <marco.atzeri@gmail.com>
From: Marco Atzeri <marco.atzeri@gmail.com>
To: Andres Freund <andres@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2014-02-15T22:40:22Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
MinGW: Link with shell32.dll instead of shfolder.dll.
- 53566fc0940c 9.5.0 cited
-
Centralize getopt-related declarations in a new header file pg_getopt.h.
- 60ff2fdd9970 9.4.0 cited
-
Get rid of use of dlltool in Mingw builds.
- 846e91e0223c 9.4.0 cited
-
Export a few more symbols required for test_shm_mq module.
- 7d7eee8bb702 9.4.0 cited
-
Export set_latch_on_sigusr1 symbol for Windows.
- 708c529c7fde 9.4.0 cited
-
Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
- 889f03812916 8.1.0 cited
On 15/02/2014 23:37, Andres Freund wrote:
> On 2014-02-15 17:26:30 -0500, Tom Lane wrote:
>> Andres Freund <andres@2ndquadrant.com> writes:
>>> On 2014-02-15 22:11:37 +0100, Marco Atzeri wrote:
>>>> ../../src/timezone/localtime.o ../../src/timezone/strftime.o
>>>> ../../src/timezone/pgtz.o ../../src/port/libpgport_srv.a
>>>> ../../src/common/libpgcommon_srv.a -lintl -lssl -lcrypto -lcrypt -lldap -o
>>>> postgres
>>>> libpq/auth.o:auth.c:(.text+0x1940): undefined reference to `in6addr_any'
>>
>>> Could you try additionally linking with -lwsock32?
>>
>> The interesting question here is why it used to work. There is no
>> "extern" for in6addr_any in our code, so there must have been a
>> declaration of that constant in some system header. Which one, and
>> what linkage is it defining, and where was the linkage getting
>> resolved before?
>
> mingwcompat.c has the following ugly as heck tidbit:
>
> #ifndef WIN32_ONLY_COMPILER
> /*
> * MingW defines an extern to this struct, but the actual struct isn't present
> * in any library. It's trivial enough that we can safely define it
> * ourselves.
> */
> const struct in6_addr in6addr_any = {{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}};
>
> I think when that was added the problem might just have been
> misanalyzed, but due to the auto import magic this probably wasn't
> noticed...
>
> Greetings,
>
> Andres Freund
>
on cygwin header in /usr/include
32 $ grep -rH in6addr_any *
cygwin/in6.h:extern const struct in6_addr in6addr_any;
cygwin/version.h: in6addr_any, in6addr_loopback.