Reprint: Linux under C Programming Common header file

Source: Internet
Author: User
Tags bit set locale mathematical functions posix prototype definition

Header file home directory include

There are a total of 32. h header files in the header file directory. There are 13 in the main directory, 4 in the ASM subdirectory, 10 in the Linux subdirectory, and 5 in the SYS subdirectory. The respective functions of these header files are as follows, the specific functions and the information contained in the 14th chapter.

<a.out.h>:a.out header file that defines the a.out execution file format and some macros.
&LT;CONST.H&GT;: constant symbol header file, currently only defines the flag bits of the I_mode field in the I node.
<ctype.h>: A character type header file that defines some macros about character type judgments and conversions.
<errno.h>: Error xwould file containing various error numbers in the system. (Linus introduced from the Minix).
<fcntl.h>: The file control header file, which is used for the operation of the file and its descriptor to control the definition of the constant symbol.
<signal.h>: Signal header file, define signal symbol constants, signal structure and signal operation function prototype.
&LT;STDARG.H&GT;: A standard parameter header file that defines a variable parameter list as a macro. The main description is a type (va_list) and 3 macros (Va_start, Va_arg, and Va_end) for vsprintf, vprintf, vfprintf functions.
&LT;STDDEF.H&GT;: standard definition header file, defines null, Offsetof (TYPE, MEMBER).
<string.h>: string header file that defines some embedded functions for string manipulation.
&LT;TERMIOS.H&GT;: terminal input and Output function header file, mainly defines the terminal interface to control the asynchronous communication port.
<time.h>: The time type header file, mainly defines the TM structure and some time-related function prototype.
<unistd.h>:linux a standard header file that defines various symbol constants and types, and declares various functions. For example, __library__ is defined, and the system call number and inline assembler _syscall0 () are included.
<utime.h>: User Time header file, defines the access and modification time structure, and the Utime () prototype.

(1) Architecture related header file subdirectory include/asm

These header files primarily define data structures, macro functions, and variables that are closely related to the CPU architecture. A total of 4 files.

A <ASM/IO.H>:I/O header file that defines functions for I/O port operations in the form of an embedded assembler of macros.
<asm/memory.h>: Memory copy header file containing memcpy () embedded assembly macro function.
<asm/segment.h>: Segment operation header file, defines the embedded assembler function for the segment register operation.
<asm/system.h>: System header file, which defines the embedded assembly macros for setting or modifying descriptors/break gates, etc.

(2) Linux kernel dedicated header file subdirectory Include/linux

<linux/config.h>: Kernel configuration header file, define keyboard language and hard disk type (Hd_type) options.
<linux/fdreg.h>: Floppy drive header file containing some definitions of the floppy disk controller parameters.
<linux/fs.h>: File system header file, definition file table structure (File,buffer_head,m_inode, etc.).
<LINUX/HDREG.H>: Hard disk parameter header file, which defines information such as access to the hard disk register port, status code, and partition table.
The <linux/head.h>:head header file defines the simple structure of the segment descriptor, and several selection constants.
<linux/kernel.h>: Kernel header file, contains some of the kernel common functions of the prototype definition.
<LINUX/MM.H>: Memory management header file containing page size definitions and some page release function prototypes.
<linux/sched.h>: Scheduler header file that defines the data for the task structure task_struct, initial task 0,
As well as some embedded assembler function macro statements about descriptor parameter setting and getting.
<LINUX/SYS.H>: The system calls the header file, which contains 72 system calls to the C function handler, beginning with "Sys_".
The <linux/tty.h>:tty header file defines the parameters and constants for Tty_io, serial communication.

(3) System-specific data structure subdirectory Include/sys

<sys/stat.h>: File status header file, containing file or file system state structure stat{} and constants.
<SYS/TIMES.H>: Defines a process run time structure TMS and The Times () function prototype.
<sys/types.h>: A type header file that defines the basic system data type.
<sys/utsname.h>: System name Structure header file.
<sys/wait.h>: Wait for the calling header file to define the system call Wait () and Waitpid () and the associated constant symbol.

Linux Common header files are as follows:

POSIX standard-Defined header file

<dirent.h> Catalog Items

<fcntl.h> File Control

<fnmatch.h> file name Match type

<glob.h> path name pattern match type

<grp.h> Group files

<netdb.h> Network Database Operations

<pwd.h> Password file

<regex.h> Regular Expressions

<tar.h> Tar archive values

<termios.h> Terminal I/O

<unistd.h> Symbolic constants

<utime.h> file time

<wordexp.h> character Extension types

-------------------------

<arpa/inet.h> Internet definition

<net/if.h> Socket Local Interface

<netinet/in.h> Internet Address Family

<netinet/tcp.h> Transmission Control Protocol Definition

-------------------------

<sys/mman.h> Memory Management Statement

<sys/select.h> Select function

<sys/socket.h> Socket Excuses

<sys/stat.h> file Status

<sys/times.h> Process Time

<sys/types.h> Basic System data types

<sys/un.h> UNIX domain sockets definition

<sys/utsname.h> system Name

<sys/wait.h> Process Control

------------------------------

POSIX-defined xsi extension header file

<cpio.h> Cpio Archive values

<dlfcn.h> Dynamic Links

<fmtmsg.h> Message Display structure

<ftw.h> File Tree Roaming

<iconv.h> code set conversion using programs

<langinfo.h> Language Information Constants

<libgen.h> Pattern matching function definition

<monetary.h> Currency Types

<ndbm.h> Database Operations

<nl_types.h> Message Categories

<poll.h> Polling functions

<search.h> search Form

<strings.h> string manipulation

<syslog.h> System error log records

<ucontext.h> User Context

<ulimit.h> User Restrictions

<utmpx.h> User Account Database

-----------------------------

<sys/ipc.h> IPC (Named pipes)

<sys/msg.h> Message Queuing

<sys/resource.h> Resource Operations

<sys/sem.h> Signal Volume

<sys/shm.h> shared storage

<sys/statvfs.h> File System Information

<sys/time.h> Time Type

<sys/timeb.h> additional date and time definitions

<sys/uio.h> vector I/O operations

------------------------------

POSIX-defined optional header file

<aio.h> Asynchronous I/O

<mqueue.h> Message Queuing

<pthread.h> Threads

<sched.h> Execution Scheduling

<semaphore.h> Signal Volume

<spawn.h> real-time Spawn interface

<stropts.h> XSI Streams interface

<trace.h> Event Tracking

3. List of header files

C

#i nclude <assert.h>//Set insertion point

#i nclude <ctype.h>//character processing

#i nclude <errno.h>//Definition error code

#i nclude <float.h>//floating point processing

#i nclude <iso646.h>//macros corresponding to various operators

#i nclude <limits.h>//define constants for the most values of various data types

#i nclude <locale.h>//define localization C functions

#i nclude <math.h>//Defining mathematical functions

#i nclude <setjmp.h>//exception handling support

#i nclude <signal.h>//signaling mechanism support

#i nclude <stdarg.h>//indefinite parameter list support

#i nclude <stddef.h>//Common constants

#i nclude <stdio.h>//defining input/Output functions

#i nclude <stdlib.h>//define miscellaneous functions and memory allocation functions

#i nclude <string.h>//String processing

#i nclude <time.h>//define functions on time

#i nclude <wchar.h>//wide character processing and input/output

#i nclude <wctype.h>//Wide character classification

Traditional C + +

#i nclude <fstream.h>//Switch to <fstream>

#i nclude <iomanip.h>//Switch to <iomainip>

#i nclude <iostream.h>//Switch to <iostream>

#i nclude <strstrea.h>//This class is no longer supported, use the StringStream in <sstream>

————————————————————————————————

Standard C + +

#i nclude <algorithm>//stl General algorithm

#i nclude <bitset>//stl bit set container

#i nclude <cctype>//character processing

#i nclude <cerrno>//Definition error code

#i nclude <cfloat>//floating point processing

#i nclude <ciso646>//macros corresponding to various operators

#i nclude <climits>//define constants for the most values of various data types

#i nclude <clocale>//Defining localization functions

#i nclude <cmath>//Defining mathematical functions

#i nclude <complex>//plural class

#i nclude <csignal>//signaling mechanism support

#i nclude <csetjmp>//exception handling support

#i nclude <cstdarg>//indefinite parameter list support

#i nclude <cstddef>//Common constants

#i nclude <cstdio>//defining input/Output functions

#i nclude <cstdlib>//define miscellaneous functions and memory allocation functions

#i nclude <cstring>//String processing

#i nclude <ctime>//define functions on time

#i nclude <cwchar>//wide character processing and input/output

#i nclude <cwctype>//Wide character classification

#i nclude <deque>//stl Dual-ended queue container

#i nclude <exception>//Exception handling class

#i nclude <fstream>//File input/output

#i nclude <al>//stl defining an arithmetic function (instead of an operator)

#i nclude <limits>//define a variety of data type value constants

#i nclude <list>//stl Linear list container

#i nclude <locale>//Localization specific information

#i nclude <map>//stl mapping container

#i nclude <memory>//stl memory allocation via allocator

#i nclude <new>//Dynamic memory allocation

#i nclude <numeric>//stl commonly used digital operations

#i nclude <iomanip>/parametric input/output

#i nclude <ios>//Basic input/output support

#i nclude <iosfwd>//input/output system usage pre-declaration

#i nclude <iostream>//data stream input/output

#i nclude <istream>//Basic input stream

#i nclude <iterator>//stl iterators

#i nclude <ostream>//Basic output stream

#i nclude <queue>//stl queue container

#i nclude <set>//stl Collection Container

#i nclude <sstream>//string-based streaming

#i nclude <stack>//stl stack container

#i nclude <stdexcept>//Standard Exception class

#i nclude <streambuf>//Bottom input/output support

#i nclude <string>//String class

#i nclude <typeinfo>//run-time type information

#i nclude <utility>//stl Generic template class

#i nclude <valarray>//operations on arrays that contain values

#i nclude <vector>//stl dynamic Array container

————————————————————————————————

C99 Added Parts

#i nclude <complex.h>//Complex processing

#i nclude <fenv.h>//floating point environment

#i nclude <inttypes.h>//integer format conversion

#i nclude <stdbool.h>//Boolean environment

#i nclude <stdint.h>//Integral environment

#i nclude <tgmath.h>//general type Math macro

Reprint: Linux under C Programming Common header file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.