Re: windows consolidated cleanup

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-04-24T17:47:34Z
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. Move include for Python.h above postgres.h to eliminate compiler warning.


On 04/24/2011 12:14 PM, Tom Lane wrote:
> Peter Eisentraut<peter_e@gmx.net>  writes:
>> The hunk below looks a bit evil.
>> At least a comment would be good to explain why this is necessary.
> Yeah, having to cast away const seems uglier than the original problem.
> Can't we avoid that?


I'm not sure how, since the second argument to send() is declared const, 
and the buf member of a WSABUF isn't. Why is  this worse? The compiler 
warning is effectively telling us that the compiler will be discarding 
constness anyway, isn't it?

> BTW, all of my machines as well as the Single Unix Spec are agreed that
> the second argument to send() is "const void *", not "const char *".
> If we're going to tweak this I think we should make it match exactly.
>


I'm OK with that - not sure if it will generate *more* casts or 
warnings, though.

cheers

andrew