We rely on the include path to find many of these headers. It especially doesn't make sense to use #include "foo.h" for headers in the top-level include directory.
Unlike POSIX basename(3), the GNU variant does not modify its argument. Note that basename of a path ending in "/" returns an empty string.