跳至主要内容

【转】ISO C和POSIX头文件

ISO C标准定义的头文件(24项)
<assert.h>       ----------------------   验证程序断言
<complex.h>    ----------------------   支持复数算术运算
<ctype.h>        ----------------------   字符类型
<errno.h>        ----------------------   出错码
<fenv.h>          ----------------------   浮点环境
<float.h>          ----------------------   浮点常量
<inttypes.h>    ----------------------   整型格式转换
<iso646.h>      ----------------------   替代关系操作符宏
<limits.h>         ----------------------   实现常量
<locale.h>       ----------------------   局部类别
<math.h>         ----------------------   数学常量
<setjmp.h>      ----------------------   非局部goto
<signal.h>       ----------------------   信号
<stdarg.h>      ----------------------   可变参数表
<stdbool.h>     ----------------------   布尔类型和值
<stddef.h>       ----------------------   标准定义
<stdint.h>        ----------------------   整型
<stdio.h>         ----------------------   标准I/O库
<stdlib.h>        ----------------------   实用程序库函数
<string.h>       ----------------------   字符串操作
<tgmath.h>     ----------------------   通用类型数学宏
<time.h>         ----------------------   时间和日期
<wchar.h>      ----------------------   扩展的多字节和宽字符支持
<wctype.h>     ----------------------   宽字符分类和映射支持
 
POSIX标准定义的必须的头文件(26项)
<dirent.h>      ----------------------   目录项
<fcntl.h>         ----------------------   文件控制
<fnmatch.h>   ----------------------   文件名匹配类型
<glob.h>         ----------------------   路径名模式匹配类型
<grp.h>          ----------------------   组文件
<netdb.h>      ----------------------   网络数据库操作
<pwd.h>         ----------------------   口令文件
<regex.h>      ----------------------   正则表达式
<tar.h>           ----------------------   tar归档值
<termios.h>    ----------------------   终端I/O
<unistd.h>      ----------------------   符号常量
<utime.h>       ----------------------   文件时间
<wordexp.h>   ----------------------   字扩展类型
<arpa/inet.h>  ----------------------   Internet定义
<net/if..h>       ----------------------   套接字本地接口
<netinet/in.h> ----------------------   Internet地址族
<netinet/tcp.h>----------------------   传输控制协议定义
<sys/mman.h>----------------------   内存管理声明
<sys/select.h>----------------------   select函数
<sys/socket.h>----------------------   套接字接口
<sys/stat.h>    ----------------------   文件状态
<sys/times.h>  ----------------------   进程时间
<sys/types.h>  ----------------------   基本系统数据类型
<sys/un.h>      ----------------------   UNIX域套接字定义
<sys/utsname.h>----------------------系统名
<sys/wait.h>    ----------------------   进程控制
 
POSIX标准定义的XSI扩展头文件(26项)
<cpio.h>          ----------------------   cpio归档值
<dlfcn.h>         ----------------------   动态链接
<fmtmsg.h>     ----------------------   消息显示结构
<ftw.h>            ----------------------   文件树漫游
<iconv.h>        ----------------------   代码集转换实用程序
<langinfo.h>    ----------------------   语言信息常量
<libgen.h>       ----------------------   模式匹配函数定义
<monetary.h>  ----------------------   货币类型
<ndbm.h>        ----------------------   数据库操作
<nl_types.h>   ----------------------   消息类别
<poll.h>           ----------------------   轮询函数
<search.h>      ----------------------   搜索表
<strings.h>      ----------------------   字符串操作
<syslog.h>      ----------------------   系统出错日志记录
<ucontext.h>   ----------------------   用户上下文
<ulimit.h>        ----------------------   用户限制
<utmpx.h>       ----------------------   用户帐户数据库
<sys/ipc.h>      ----------------------   IPC
<sys/msg.h>    ----------------------   消息队列
<sys/resource.h>-------------------   资源操作
<sys/sem.h>    ----------------------   信号量
<sys/shm.h>    ----------------------   共享存储
<sys/statvfs.h>----------------------   文件系统信息
<sys/time.h>    ----------------------   时间类型
<sys/timeb.h>  ----------------------   附加的日期和时间定义
<sys/uio.h>      ----------------------   矢量I/O操作
 
POSIX标准定义的可选头文件(8项)
<aio.h>            ----------------------   异步I/O
<mqueue.h>    ----------------------   消息队列
<pthread.h>    ----------------------   线程
<sched.h>       ----------------------   执行调度
<semaphore.h>---------------------   信号量
<spawn.h>       ----------------------   实时spawn接口
<stropts.h>      ----------------------   XSI STREAMS接口
<trace.h>         ----------------------   时间跟踪
 

评论

此博客中的热门博文

【转】AMBA、AHB、APB总线简介

AMBA 简介 随着深亚微米工艺技术日益成熟,集成电路芯片的规模越来越大。数字IC从基于时序驱动的设计方法,发展到基于IP复用的设计方法,并在SOC设计中得到了广泛应用。在基于IP复用的SoC设计中,片上总线设计是最关键的问题。为此,业界出现了很多片上总线标准。其中,由ARM公司推出的AMBA片上总线受到了广大IP开发商和SoC系统集成者的青睐,已成为一种流行的工业标准片上结构。AMBA规范主要包括了AHB(Advanced High performance Bus)系统总线和APB(Advanced Peripheral Bus)外围总线。   AMBA 片上总线        AMBA 2.0 规范包括四个部分:AHB、ASB、APB和Test Methodology。AHB的相互连接采用了传统的带有主模块和从模块的共享总线,接口与互连功能分离,这对芯片上模块之间的互连具有重要意义。AMBA已不仅是一种总线,更是一种带有接口模块的互连体系。下面将简要介绍比较重要的AHB和APB总线。 基于 AMBA 的片上系统        一个典型的基于AMBA总线的系统框图如图3所示。        大多数挂在总线上的模块(包括处理器)只是单一属性的功能模块:主模块或者从模块。主模块是向从模块发出读写操作的模块,如CPU,DSP等;从模块是接受命令并做出反应的模块,如片上的RAM,AHB/APB 桥等。另外,还有一些模块同时具有两种属性,例如直接存储器存取(DMA)在被编程时是从模块,但在系统读传输数据时必须是主模块。如果总线上存在多个主模块,就需要仲裁器来决定如何控制各种主模块对总线的访问。虽然仲裁规范是AMBA总线规范中的一部分,但具体使用的算法由RTL设计工程师决定,其中两个最常用的算法是固定优先级算法和循环制算法。AHB总线上最多可以有16个主模块和任意多个从模块,如果主模块数目大于16,则需再加一层结构(具体参阅ARM公司推出的Multi-layer AHB规范)。APB 桥既是APB总线上唯一的主模块,也是AHB系统总线上的从模块。其主要功能是锁存来自AHB系统总...

【转】smb协议栈使用示例

/*  * * uncdownload.c  * *  * * Utility for downloading files from SMB shares using libsmbclient  * *  * * Copyright(C) 2006 Sophos Plc, Oxford, England.  * *  * * This program is free software; you can redistribute it and/or modify it under the terms of the  * * GNU General Public License Version 2 as published by the Free Software Foundation.  * *  * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  * * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * * See the GNU General Public License for more details.  * *  * * You should have received a copy of the GNU General Public License along with this program; if not,  * * write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  * *  * */ # include < sys / types . h > # include < sys / time . h > # include ...

【转】udp编程实例

UDP通讯实例 2008-04-29 15:30:05 / 个人分类: linux C编程 UDP协议的几点好处: 1.UDP不要求保持一个连接; 2.UDP没有因接收方认可收到数据包(或者当数据包没有正确抵达而自动重传)而带来的开销; 3.设计UDP的目的是用于短应用和控制信息; 4.在一个数据包接一个数据包的基础上,UDP要求的 网络 带宽比TCP更小。 UDP的几个缺点: 1.程序员必须创建代码检测传输错误并进行重传(如果应用程序要求这样做); 2.程序员必须把大数据包分片。 code: <1> /* * sender.c--UDP protocol example */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> int port = 6789; int main() {     int socket_descrīptor;     int iter = 0;     char buf[80];     struct sockaddr_in address;     /* Initialize socket address structure for Interner Protocols */     bzero(&address, sizeof(address)); // empty data structure     address.sin_family = AF_INET;     address.sin_addr.s_addr = inet_addr("127.0.0.1");     address...