Re: narwhal and PGDLLIMPORT

Andres Freund <andres@2ndquadrant.com>

From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Marco Atzeri <marco.atzeri@gmail.com>, pgsql-hackers@postgresql.org
Date: 2014-02-15T17:21:56Z
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

On 2014-02-15 12:16:58 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2014-02-15 10:59:17 -0500, Tom Lane wrote:
> >> I don't have time right now to research it (have to go shovel snow),
> >> but I think that at least some of the issue was that we needed the
> >> externs when we force use of our src/port implementation.
> 
> > I think that'd be solvable easy enough if we'd just always included pg's
> > getopt_long.h (or a new getopt.h) which properly deals with defining
> > them when included. That'd centralize all the magic and it'd overall get
> > rid of a ton of ifdefs and externs.
> 
> Yeah, there are enough copies of that stuff that centralizing them
> sounds like a great idea.  Call it "pg_getopt.h", perhaps?

I'm just working on it. pg_getopt.h was exactly what I came up with.

> (1) invent pg_getopt.h, which would #include <getopt.h> if available
> and then provide properly-ifdef'd externs for optarg and friends;
> getopt_long.h would #include pg_getopt.h.

That's what I've done.

I'll post in a minute, just wanted to give a headsup so we don't
duplicate work.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services