DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3 Weeks Ago
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default 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):

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

Those in gnu/... probably aren't used by obsd, because are of glibc and obsd doesn't use glibc. Am I right?
The first and the last, instead, I suppose are used by obsd.
----------------------------------
Searching in Ubuntu 20.4

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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 11:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick