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

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?

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

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.

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…

Wanted to chime in and mention that the strange include path is giving us some pain as well. We need to link to the Julia uv library to use async C callbacks and the current structure of the includes within uv.h and the files within the JULIA_ROOT/include/julia/uv folder require you to add JULIA_ROOT/include/julia to your include paths. This can generate an ambiguity when specifically trying to include headers from the julia folders where it creates a default behavior of defaulting back to system libraries instead of generating a compiler error if the include path was not set up properly.

I would suggest modifying the files within JULIA_ROOT/include/julia to structure their own includes so that they only expect the JULIA_ROOT/include/ to be in the include path. We haven’t forayed into the julia source code yet, but we’d be happy to push up a possible fix if there’s indication that we could get traction with it.

@mmmm1998 did you end up making a bug report in the github about this issue?

No, i didn’t report this issue. But, as I see, that there are another people, which have this problem, so I have created the bug report today.