Re: narwhal and PGDLLIMPORT

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marco Atzeri <marco.atzeri@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2014-02-12T19:11:10Z
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 →
  1. MinGW: Link with shell32.dll instead of shfolder.dll.

  2. Centralize getopt-related declarations in a new header file pg_getopt.h.

  3. Get rid of use of dlltool in Mingw builds.

  4. Export a few more symbols required for test_shm_mq module.

  5. Export set_latch_on_sigusr1 symbol for Windows.

  6. Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the

Marco Atzeri <marco.atzeri@gmail.com> writes:
> On 12/02/2014 19:19, Andres Freund wrote:
>> On 2014-02-12 19:13:07 +0100, Marco Atzeri wrote:
>>> About PGDLLIMPORT , my build log is full of "warning: optarg redeclared
>>> without dllimport attribute: previous dllimport ignored "

>> That should be fixed then. I guess cygwin's getopt.h declares it that way?

> from /usr/include/getopt.h

> extern char __declspec(dllimport) *optarg;      /* argument associated 
> with option */

Hm.  All of our files that use getopt also do

extern char *optarg;
extern int    optind,
            opterr;

#ifdef HAVE_INT_OPTRESET
extern int    optreset;            /* might not be declared by system headers */
#endif

			regards, tom lane