dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
805 stars 196 forks source link

Make API includes consistent. #13

Closed elfring closed 10 years ago

elfring commented 11 years ago

It is "convenient" when header files can be referenced in include statements without the specification of a directory. But a few file names (like "exception.hpp") were chosen for C++ source files here that have got the potential to get in conflict with name selections from other software libraries. The name "libsocket" was therefore added as a parent directory to some includes. I hope that this change makes their usage consistent.

The affected source code places were also adjusted so that angle brackets are used there now.

Two variables were corrected so that they fit to Make naming conventions now. The variable "API_PARENT_INC_DIR" was introduced for internal use in Make scripts.

This update suggestion corresponds to the issue "Clarification for header file references".

dermesser commented 11 years ago

This does not work because when compiling the project for the first time the header files aren't yet in /usr/include/libsocket/:

dgramclient.cpp:47:36: fatal error: libsocket/exception.hpp: No such file or directory
elfring commented 11 years ago

How do you think about a bit of fine-tuning for the build configuration? Would you like to consider any of the following possibilities?

dermesser commented 11 years ago

We could first copy the headers to the include paths. The symlink idea isn't bad either (IMHO better than copying the files first).

elfring commented 10 years ago

I would appreciate a comment to clarify this issue a bit more.

dermesser commented 10 years ago

Sorry, I thought this issue is finished -- it's just so old. The original issue is that the examples in examples/ and examples++/ didn't compile without libsocket already installed on that system, right?

In 5084db (just now) I fixed all examples (there were two in examples/) to use only the shipped header files in /headers/. Does that solve your problem?

elfring commented 10 years ago

Please reconsider my four suggestions for this issue again also after your update.

17twenty commented 10 years ago

elfring: Looks like that causes a merge conflict. You will need to rebase.