libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Remove plibc?


From: LRN
Subject: Re: [libmicrohttpd] Remove plibc?
Date: Sat, 25 Jan 2014 18:04:54 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Thunderbird/29.0a1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25.01.2014 17:50, Evgeny Grin wrote:
> 
> 
> 25.01.2014, 17:34, "LRN" <address@hidden>:
>> This is why wrappers may still have to remain. Sprinkling
>> W32-specific code all over MHD is not something grothoff will
>> appreciate, i'm sure. Wrappers move W32-specific parts into
>> separate source file, and look the actual MHD code look at least
>> a bit sane.
> 
> Code can be rewritten as platform-agnostic. Not much work is
> required for it. Only two places with noticeable amount of win32
> code: VirtualAlloc instead of mmap and pipe/socketpair. That's
> all.
Actually, i meant the error-handling code. Imagine you've called
accept(), and want to check the errno for possible errors. But WS2
version of accept() doesn't set errno, it sets LastError. You need to
convert LastError to errno, otherwise your errno check won't work.
Adding conversion function call after the function call might work in
some (most, actually) cases, if it's hidden under a platform-specific
macro that expands to nothing on non-W32 platforms, but using it might
be error-prone (not doing this call will result in subtle runtime
behaviour change that will be difficult to catch, and only affects W32).

mmap and socketpair are the last things i'd be concerned with. They
are definitely going to take shape of separate functions, albeit with
simplified implementation, where applicable.


- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJS48SGAAoJEOs4Jb6SI2Cw1GEIAJVA/XHjb/ykgiGQVaRl+EYN
HXWWo6yT4hb7vl4rKvzrJGuhs5j3F/gnXwUPxvVBrIFa8lvXRVLqxIyF6rQ2qg5p
2Nyo2ZzMO1jQI8BF1+aus6Ozk0XVC/SeyhcunjVJ6cgkGy1YCKO96V5rqB3h+dp5
AynxMCAlIkAwF327er4iSTMgJ0F3lgLZg9aJRbqYpCQUR/k1iQAhhOKYibkMH27G
AN6WlFCdBXwswOmQQrPdWXvmnLmhbIOMmCACiG7qpkrYN2syo3X2xawVUbNU1aU8
ZtMXqz+qbKY2IBKX0e0jUZqldmhyj8PGACftriCGCgVUvQZqioj+fchChz4U97o=
=PvYg
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]