Strange include path in unix.h in "Generic Linux Binaries for x86"

package

#1

I have a question about include/julia/uv/unix.h:45 (obvicious, this is relative path from the julia root directory). That this line
#include "uv/threadpool.h"

First, isn’t this statement tried to include include/julia/uv/threadpool.h?
But, in this case, why not just like that #include "threadpool.h".

As I understand, with current include path, compiler look up in include/julia/uvand tryies to find include/julia/uv/uv, which not exists. And, after that, starts search in system include paths. And if include/julia exists in system include paths, we succesfully will found the threadpool.h. And if not, build will failed.

It’s not look good, or I miss something?


#2

Also, there are a lot of embedded libuv in my system.
For example, /home/mmmm1998/.atom/.node-gyp/.node-gyp/iojs-1.3.13/deps/uv/include/uv-unix.h
This file similar to julia unix.h(similar structure), but the file include their threadpool.h like this:
#include "uv-threadpool.h"

Also, some include statemant have this files (as I say, there are a lot of files, but I mention only files, used in fairly large projects):
/usr/local/include/node/uv-unix.h
/usr/include/uv-unix.h


#3

I believe the source of your confusion is that using #include in C with quotes (") can find the file to include on the local path but will also fall back to searching the full include path. So, yes, #include "uv/threadpool.h" will first try to find include/julia/uv/uv/threadpool.h but failing that, and assuming that include/julia is in the include path, it will then find and include the appropriate include/julia/uv/threadpool.h.


#4

I understand, how this #include works. I don’t understand, why we don’t use #include "threadpool.h".
I use embedded julia, so this strange include path brings me some pain, forcing add JULIA_ROOT/include/julia to include directories, which not very comfortable solution.
Maybe, i should create bug report about it…