Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
20
rated 0 times [  20] [ 0]  / answers: 1 / hits: 36497  / 3 Years ago, mon, august 30, 2021, 12:53:52

I'm very new to Ubuntu. I'm looking at the directory /usr/include it contains lot of header files. I know they have specified certain constants and other information that are used in Ubuntu. I'm confused with the use of it.



One of the directory inside is linux/byteorder. Which has two files:



big_endian.h  little_endian.h


I wonder why two files are needed? My machine will be either big endian or little endian right? Didn't ubuntu while installation didn't pick my system byte order? Does /usr/include is just same for all machines? What is the exact use of it?



Thanks in advance.


More From » 12.04

 Answers
0

That folder includes the header files for C compilers. Such as "stdio.h", "stdlib.h" etc.



When you type header information in the C source file such #include <stdio.h> the compiler will look for the file in /usr/include directory by default.



big_endian.h and little_endina.h files are included, because though your computer may be of only one kind, you can cross-develop application for both architecture. So, you need both header file.




[#35395] Tuesday, August 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
defendle

Total Points: 219
Total Questions: 131
Total Answers: 112

Location: Finland
Member since Sat, Nov 6, 2021
3 Years ago
;