A detailed description of common Linux header files

Source: Internet
Author: User
Tags bit set error handling function definition locale mathematical functions posix what header

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, files are system calls to Linux, like windows.h in Windows

<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 (e.g. pid_t,size_t, etc.)

<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

A list of header files for C + +

C

# include <assert.h>//Set insertion point

# include <ctype.h>//character processing

# include <errno.h>//define error codes

# include <float.h>//floating-point processing

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

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

# include <locale.h>//define localization C functions

# include <math.h>//define Mathematical functions

# include <setjmp.h>//exception handling support

# include <signal.h>//signaling mechanism support

# include <stdarg.h>//indefinite parameter list support

# include <stddef.h>//Common constants

# include <stdio.h>//define input/output functions

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

# include <string.h>//String processing

# include <time.h>//define functions on time

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

# include <wctype.h>//wide character categories

traditional C + +

# include <fstream.h>//switch to <fstream>

# include <iomanip.h>//switch to <iomainip>

# include <iostream.h>//switch to <iostream>

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

standard C + +

# include <algorithm>//stl general purpose algorithms

# include <bitset>//stl bit set container

# include <cctype>//character processing

# include <cerrno>//define error codes

# include <cfloat>//floating-point processing

# include <ciso646>//macros corresponding to various operators

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

# include <clocale>//define localization functions

# include <cmath>//define Mathematical functions

# include <complex>//plural class

# include <csignal>//signaling mechanism support

# include <csetjmp>//exception handling support

# include <cstdarg>//indefinite parameter list support

# include <cstddef>//Common constants

# include <cstdio>//define input/output functions

# include <cstdlib>//define miscellaneous functions and memory allocation functions

# include <cstring>//String processing

# include <ctime>//define functions on time

# include <cwchar>//wide character processing and input/output

# include <cwctype>//wide character categories

# include <deque>//stl dual-ended queue container

# include <exception>//exception handling classes

# include <fstream>//file input/output

# include <al>//stl define arithmetic functions (instead of operators)

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

# include <list>//stl linear list container

# include <locale>//localization specific information

# include <map>//stl mapping container

# include <memory>//stl memory allocations through allocators

# include <new>//dynamic memory allocation

# include <numeric>//stl common digital operations

# include <iomanip>/parametric input/output

# include <ios>//basic input/output support

# include <iosfwd>//input/output system use of the predecessor declaration

# include <iostream>//data stream input/output

# include <istream>//Basic input stream

# include <iterator>//stl iterators

# include <ostream>//Basic output stream

# include <queue>//stl queue container

# include <set>//stl collection container

# include <sstream>//string-based streams

# include <stack>//stl stack container

# include <stdexcept>//Standard Exception class

# include <streambuf>//Bottom input/output support

# include <string>//String class

# include <typeinfo>//run-time type information

# include <utility>//stl generic template classes

# include <valarray>//operations on arrays containing values

# include <vector>//stl dynamic array container

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

C99 Added Parts

# include <complex.h>//complex processing

# include <fenv.h>//floating-point environment

# include <inttypes.h>//integer format conversion

# include <stdbool.h>//Boolean environment

# include <stdint.h>//Integer environment

# include <tgmath.h>//universal type Math macro

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

Socket programming is often used to:
SYS/TYPES.H: Data type definition
Sys/socket.h: Provides socket functions and data structures
Netinet/in.h: Defining Data Structures sockaddr_in
Arpa/inet.h: provides IP address translation functions
Netdb.h: Provides functions for setting and retrieving domain names
Sys/ioctl.h: Provides functions for I/O control
Sys/poll.h: A function that provides a socket wait test mechanism


other header files that are common in network programs
Unistd.h: Provides common functions for files, directories, programs, and process operations
Errno.h: Provides the definition of error number errno for error handling
Fcntl.h: Provides functions for file control
Time.h: Provides a function about time
Crypt.h: Provides cryptographic functions that use the DES encryption algorithm
Pwd.h: Provides functions for/etc/passwd file access
Shadow.h: Provides functions for/etc/shadow file access
Pthread.h: Functions that provide multithreaded operations
Signal.h: Provides functions for signal manipulation
Sys/wait.h, sys/ipc.h, sys/shm.h: functions that provide process waiting, interprocess communication (IPC), and shared memory

If you want to know what header files a function needs to include, which libraries you need to connect to, you can use man to see

Mans Function_name
Like what
Man 2 socket
Tell you what you need to include:
#include <sys/types.h>
#include <sys/socket.h>
Man sin:
#include <math.h>
Link WITH-LM.

There are several ways to locate a file
Locate xxxx
Whereis xxxx
Find/usr/include-name "XXXX"
But your file may not be the standard system with the header files, may be the book's own written header files

references from: http://blog.chinaunix.net/uid-24219701-id-67552.html

A detailed description of common Linux header files

Related Article

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.