|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
multilpe headers with the same name
Hi.
Can you explain me why header files with the same name are present in more than one place in the same system? For example (but it's true also for other headers) look at where stdio.h is in obsd and ubuntu: -------------------------------- downloading src.tar.gz adn sys.tar.gz of obsd 7.2, extracting and searching (now I'm working with ubuntu 20.4, forgive me): Code:
ciccio@ciccio-81mt:~/Desktop/obsd-src$ find -name stdio.h ./include/stdio.h ./gnu/usr.bin/gcc/gcc/fixinc/tests/base/stdio.h ./gnu/llvm/libcxx/include/stdio.h ./gnu/gcc/fixincludes/tests/base/stdio.h ./gnu/gcc/libstdc++-v3/include/c_compatibility/stdio.h ./gnu/gcc/libstdc++-v3/include/tr1/stdio.h ./gnu/gcc/libssp/ssp/stdio.h ./gnu/lib/libstdc++/libstdc++/include/c_compatibility/stdio.h ./lib/libc/hidden/stdio.h The first and the last, instead, I suppose are used by obsd. ---------------------------------- Searching in Ubuntu 20.4 Code:
ciccio@ciccio-81mt:/usr$ find -name stdio.h ./include/x86_64-linux-gnu/bits/stdio.h ./include/c++/9/tr1/stdio.h ./include/stdio.h The contents of these files are different. I suppose that the one really included in my c codes is ..../include/stdio.h. Which is the function of the others? Last edited by ocicat; 22nd October 2023 at 02:19 AM. Reason: Added [code] & [/code] tags for clarity. |
|
|||
GCC stands for GNU C compiler
lbcxx has to do with the libc++ library It's just me taking a wild shot in the dark but I think the reason that you are seeing the same gnu C compiler headers in multiple places on two different operating system is that the gnu tools here originally meant to be cross platform. So you could easily port them between the multitude of veracious Unixes and Unix like opperating systems for example you could theoretically code a program on Linux and with a couple changes port you peice of software to one of the BSD or even an older OS Like AT&T Bell laboratories Unix of which hjter are multiple versions. This goes back to the early days of the Free Software Foundation (FSF) when the where trying to get people to adopt the gnu mach kernel which eventually blew up in their faces spectacularly so with the wide spread fail;ure of the gnawk kernel, Everyone decided to start porting the gnu tool chain to the other Unix like operating systems.
__________________
Kindly You Buddy, Chip EM:firedolphin8858@gmx.us |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiler doesn't see headers in /usr/local/include | puffymon | OpenBSD General | 2 | 17th September 2017 02:46 PM |
gcc-4.9.3p0 missing some headers? | notooth | OpenBSD Packages and Ports | 4 | 21st November 2015 04:20 PM |
Viewing manpages: Headers and footers get repeated. | Carpetsmoker | Solaris | 3 | 21st February 2010 02:55 AM |