libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Real Windows support?


From: LRN
Subject: Re: [libmicrohttpd] Real Windows support?
Date: Mon, 14 Oct 2013 11:08:15 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Thunderbird/27.0a1

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

On 14.10.2013 05:48, Luke-Jr wrote:
> I used libmicrohttpd in my software, but I feel as if I may be forced to 
> write 
> my own HTTP server implementation because it is quite frankly not really 
> portable to Windows.
Define "portable".

> Why is this non-standard plibc library required?
plibc is a thin POSIX compatibility layer for Windows. MHD is very
POSIX, Windows is not, which is why it is required.

> Are there any plans to do an actual native port?
There are two alternatives:
1) Move plibc code into MHD, simplifying it somewhat (unused functions
can be removed, existing functions can be customized to work best for
the purpose MHD uses them). Many projects do that kind of thing (use
internal compat layer). MHD does not (uses external compat library).
Whether that is a good decision or not is an open question.
2) Rewrite MHD to use Windows sockets and other Windows constructs
(async callbacks, threads/fibers, completion routines, etc). This will
most likely fork MHD, since the code you end up with will not be
compatible with the POSIX abstractions that MHD uses.

> Since my software already does 
> pretty much everything libmicrohttpd should depend on for other protocols, 
> perhaps I can help make this happen if I know what is needed.
What exactly does your software do?

> 
> My problems with plibc are on a number of levels:
> - I had to dig to find a version in subversion that actually compiles - none 
> of the releases seem to with modern compilers.
plibc is poorly maintained, yes. This is totally ndurner's fault, and
not mine (despite the fact that i have commit access to plibc repository
and have been the author of the last batch of patches during the last
year and...oh shit...).

> - Even then, I could never get a working Win64 build.
There have been some patches offered to plibc that would fix this.
However, some things plibc does (like storing handles in 'int') don't
work on x86_64, so it is still unclear what the right thing to do would
be, and whether it's really feasible to do it, and whether that would
break source-level compatibility with all plibc-using programs or not.
Few people really need x86_64, so this issue never got any development.

> - It is calling setlocale(LC_ALL, ".OCP"), which screws up my program by 
> causing sprintf (uses in other protocols my software needs to support!) to 
> use 
> commas for the decimal point instead of periods on non-English systems (and 
> who knows what other oddities).
I am not the one who added this, so i don't know what the reasoning
behind it was.


Now, reading this message might have given you an impression that plibc
is a really bad library that, in its present state, screws you up just
as much as it helps.

And... that's all i have.

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

iQEcBAEBAgAGBQJSW5heAAoJEOs4Jb6SI2Cw3G4H/1GKadGsh2B7OjbNBMNhIUyf
ffPR5vc4n89RYF40BIvbDkhiQPV4QB7OfxgATvCUtuMBkW/GvPCGGSFbf4iKkJxH
Azc4zsns3Y6UXa6zhjAddheneYbMa0P1ydonJ2PhP+7SocznQuJPswwjiUwbzYey
Ae1fBddsSpdVCfJGoUM7ZG+JYRDOr2V7uoUMomfpiBUaU6idP358pqVHrjMHfeTu
idukw4+TUx0owmb0Awun8m5ywXh6k+Cpe1GSFfXPQchcS1PFVNmEa7P0ln0mFY+S
pHlz6xUqU8Yfe3MxKOfTxVQaG1rk47ioEXVkm06URFjDjp9YPlXHI7/tj9paIXc=
=NK4l
-----END PGP SIGNATURE-----



reply via email to

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