libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Remove plibc?


From: Evgeny Grin
Subject: Re: [libmicrohttpd] Remove plibc?
Date: Thu, 30 Jan 2014 20:45:04 +0400

Hi!

First two commits were added to 
https://github.com/Karlson2k/libmicrohttpd/commits/remove_plibc
To get them as patches: 
https://github.com/Karlson2k/libmicrohttpd/commit/06d862a22f93d131490f576da8732284aedb0114.patch
 
https://github.com/Karlson2k/libmicrohttpd/commit/0e49f7a9794272e813edce47deeb1199ca717da7.patch

Could you review them as W32-port maintainer?
If they are OK in general, I'll continue to working on MHD code.


Best Wishes,
Evgeny

26.01.2014, 19:23, "LRN" <address@hidden>:
> On 26.01.2014 18:29, Evgeny Grin wrote:
>
>>  On 26.01.2014, 04:21, "LRN" wrote:
>>>  Going back to the list of imports: Wrappers that ARE needed
>>>  (require errno conversion): _win_recv _win_send _win_accept
>>>  _win_socket
>>>
>>>  Wrappers that are NOT needed, but are good to have for error
>>>  reporting (again, they do errno conversion): _win_setsockopt
>>>  _win_bind _win_listen
>>>
>>>  Implementations (may or may not be simplified, depends on the
>>>  case): _win_mmap _win_munmap _win_select _win_socketpair
>>>  _win_strerror
>>>
>>>  Wrappers that are not needed: _win_close - define CLOSE(s)
>>>  closesocket(s) _win_shutdown - define SHUTDOWN(s) shutdown(s)
>>>  _win_write - wrapper
>>>
>>>  Utility functions that are likely not needed:
>>>  _SetErrnoFromWinError - client and wrapper/implementation code
>>>  will be synchronized with regards to error handling (i.e. the
>>>  function will only convert the errors that the caller checks
>>>  for), so this generic function is only needed for error reporting
>>>  (and having actual W32 error codes is usually better for that
>>>  purpose anyway). plibc_init     - they mostly do unneeded stuff,
>>>  however WS2 startup plibc_shutdown - and cleanup functions may
>>>  need to be called in MHD.
>>>
>>>  Implementations that are not needed (already in MHD):
>>>  _win_tdelete _win_tfind _win_tsearch
>>  Good! So, to remove plibc form code we need: * implement simplified
>>  errnoFromLastErr() * add _win_recv, _win_send, _win_accept,
>>  _win_socket, _win_setsockopt, _win_bind and _win_listen to MHD. And
>>  all of them will be { _type ret = func(); errnoFromLastErr();
>>  return ret; } For compilers with inline support they can be
>>  inlined.
>
> Yep
>
>>  * add simplified implementation of _win_socketpair(). I'd name it
>>  MHD_pipe and remove #ifdef from code.
>
> There may be objections from grothoff's side. I, personally, don't care.
>
>>  * add very simplified implementation of _win_strerror(): it must
>>  process only winsock specific errors and call host strerror() for
>>  rest of errors. * add native Win32 parts to memorypool.c
>
> Yep
>
>>  Is implementation of select() really required? Isn't simple wrapper
>>  enough?
>
> No, since we don't deal with pipes anymore, it's OK to call WS2
> select() (well, it's _probably_ ok)
>
> - --
> O< ascii ribbon - stop html email! - www.asciiribbon.org
>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (MingW32)
>>
>> iQEcBAEBAgAGBQJS5ShmAAoJEOs4Jb6SI2CwjWsIALqDiGvyImIkQEDGJpZY9fuz
>> jtQpAfeYNRMjCctzJtmjs/XA6j9KCRGYlmRCbYCftb5K57APcGdOLebfl4oEzvMX
>> ZqW6Sg8Smf/ISNkSAINQ/ylPbUXM4+jkViskZ+rYO4RsDxKDxTsgHcvAelW0HHyq
>> JAyYiBFKIjK7K2Tq+e7Vz9/ccyVphpLzEs/bMuwT8yJ+jDvrxSCBs58ODGIdD3P1
>> B0JjZnv0a+rthRfew181XKhwbjyYpF72WCJIAWaISKCvrCJqumUUMw8zqpAL+kgT
>> yfgKw3NfkJ9LblO98YKghXFynC6Ntm8wtLx8UELWg5Ew8GLQPHdL9sE0mA5SbSc=
>> =EuOJ
>> -----END PGP SIGNATURE-----



reply via email to

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