libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Remove PlibC from autotools files


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Remove PlibC from autotools files
Date: Wed, 07 Aug 2013 10:56:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7

On 08/07/13 10:43, LRN wrote:
-----BEGIN PGP SIGNED MESSAGE-----

PLibc does a few things.
Until yesterday, it provided a compliant printf/scanf implementation.
Well, now it doesn't (on my machine).

Also, it provides:
* ctime() and ctime_r() that work on W32
* Utility functions for converting W32 error codes to errno values
* flock() that works on W32 (never tested that one though)
* gmtime_r() that works on W32 (borrowed from GNU libc)
* hsearch() and hsearch_r()
* inet_ntop() and inet_pton() that work on any version of Windows (not
just Vista and later)
* kill() that works on W32 somewhat (only for process termination)
* partial nl_langinfo() implementation for W32
* lsearch() and lfind()
* mkstemp ()
* mmap () and munmap() that work on W32 somewhat (not very
POSIX-compliant though)
* some not-very-good pipe() and mkfifo() implementations
* string conversion (utf-8 to local and back) functions that do not
depend on libiconv (W32-only, obviously)
* rudimental symlink support (using shortcuts, ugh!) and realpath()
implementation based on that
* getaddrinfo(), getnameinfo() and freeaddrinfo(), apparently
independent of Windows version
* statfs() that works on W32 (with obvious limitations)
* a (presumably) fast strcasestr() implementation
* a strerror() implementation
* strndup() and strnlen() for W32 (well, for mingw.org; mingw-w64 has
strnlen for sure; not sure about strndup())
* strptime() from GNU libc
* tsearch()
* rudimental POSIX path support (knows how to expand ~, /tmp, /dev/null,
/etc, /com, /var and any /-starting path, infers root directory from dll
path or from a special registry value - i don't like it, but it's a
valid implementation)

And most importantly:
* utf-8 everywhere
* single integer fd space and select() that works with it (the integer
fd space is prone to conflicts though, and select() is suboptimal. IMO,
this is the weakest part of plibc)

Does any of that apply to libmicrohttpd?

Some of it does, some does not. The question is, which of these do we use for which there is also no variant available on the relevant w32-variants. I cannot tell, hence I floated the patch to see how bad things would break ;-).

I did notice that you've bumped
minimal W32 version to Vista, sidestepping the inet_{ntop,pton}()
problem.

Well, I saw that as a temporary hack for that one binary, which might not be useful to begin with and could thus be easily eliminated entirely.

What about utf-8? Does MHD use open, close, readdir on disk files?

MHD never opens files.

The select thing is probably the worst (if you compare to GNUnet
implementation), but also the most useful for MHD. Without it you won't
be able to select on sockets and pipes in one call.

Michael seemed to suggest that with his patch things would still work; obviously, without select on pipes, they won't. Michael, did you test MHD with your patches first? You wrote they worked on XP...

Happy hacking!

-Christian



reply via email to

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