PDA

View Full Version : Duplicated header files in ubuntu?



StOoZ
September 4th, 2008, 09:03 AM
I wonder , any reason why do I have duplication of dirent.h ?

/usr/include/dirent.h
/usr/include/bits/dirent.h
/usr/include/linux/dirent.h
/usr/include/tcl8.4/tcl-private/compat/dirent.h
/usr/src/linux-headers-2.6.24-19/include/linux/dirent.h
/usr/src/linux-headers-2.6.24-19-generic/include/linux/dirent.h

slavik
September 4th, 2008, 09:14 AM
some might be links, others might be including different dirent.h files.

keep in mind that /usr/include/tcl8.4 is for tcl headers, not C.

StOoZ
September 4th, 2008, 09:22 AM
I see , so basically if I want to use it in a C++ program , I will use

/usr/include/dirent.h ?

slavik
September 4th, 2008, 09:23 AM
yes ... #include <cdirent> (or w/e the C++ way for including C system headers is).

StOoZ
September 4th, 2008, 09:29 AM
Right. I hate the design of these C library files... :(

slavik
September 4th, 2008, 09:37 AM
what exactly do you dislike about them?

StOoZ
September 4th, 2008, 09:40 AM
they are not C++ user friendly :)