etr/libhttpserver — pull request #42 by waTeim (2014-02-18 00:55:44+00:00)
Title: Modifications and cleanup for compilation on OS/X

I've made modifications mostly for compilation on OS/X to succeed. Found 1 generic bug and one bug that is OS/X specific. The resulting library have been tested by inclusion in a program compiled for both OS/X and Linux. The changes are limited in scope and can be verified readily by inspection. I also made some changes that are not strictly necessary, but suited to my development environment.

More specifically;

1) clang requires that the copy constructor of http_endpoint be public.

2) Changed to match declarations and forward declarations; class for class, struct for struct

3) clang may have further requirements needing fully defined types or there is a scenario not seen before that can give rise to use of a class not fully defined for which include file inclusion fixes the problem

4) OS/X AF_INET STREAM_SOCKETS do not support SOCK_CLOSEXEC; the system call returns EPROTONOSUPPORT not EINVAL.

5) Changed a getter to const as it doesn't change the class state and expands the scenarios in which a temporary object need not be created.

6) Fixed a typo in set_requestor_port.

7) Changed to allow building in the same directory, modified .gitignore to ignore the resulting targets