Linux中常用的C\C++头文件
1、 一些头文件的作用:
<assert.h>:ANSI C。提供断言,assert(表达式)
<glib.h>:GCC。GTK,GNOME的基础库,提供很多有用的函数,如有数据结构操作函数。使用glib只需要包含<glib.h>
<dirent.h>:GCC。文件夹操作函数。struct dirent,struct DIR,opendir(),closedir(),readdir(),readdir64()等
<ctype.h>:ANSI C。字符测试函数。isdigit(),islower()等
<errno.h>:ANSI
C。查看错误代码errno是调试程序的一个重要方法。当linuc C api函数发生异常时,一般会将errno变量(需include
errno.h)赋一个整数值,不同的值表示不同的含义,可以通过查看该值推测出错的原因。在实际编程中用这一招解决了不少原本看来莫名其妙的问题。比较
麻烦的是每次都要去linux源代码里面查找错误代码的含义,现在把它贴出来,以后需要查时就来这里看了。来自linux
2.4.20-18的内核代码中的/usr/include/asm/errno.h
<getopt.h>:处理命令行参数。getopt()
2、
-------------------------
linux常用头文件如下:
POSIX标准定义的头文件
<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>
相关文档:
http://www.trendcaller.com/2009/05/hadoop-should-target-cllvm-not-java.html
Sunday, May 10, 2009
Hadoop should target C++/LLVM, not Java (because of watts)
< type="text/javascript">
digg_url="http://www.trendcaller.com/2009/05/hadoop-should-target-cllvm-not-java.html";
Over the years, ......
Tuning TCP for Linux 2.4 and 2.6
NB: Recent versions of Linux (version 2.6.17 and later) have full autotuning with 4 MB maximum buffer sizes. Except in some rare cases, manual tuning is unlikely to substantially improve the performance of these kernels over most network paths, and is not generally ......
假如有以下的路由表:
10.101.184.32 * 255.255.255.224 U 0 0 0 eth0
10.101.186.0&nb ......
环境说明
呼叫中心服务器
系统:Centos5
IP:192.168.1.146
http网站跟目录/var/www/html/
我的电脑
系统:windows XP
IP: 192.168.4.98
共享目录:D:\bgcrm (一个php的网站)
bgcrm的网站 ......
Vim和所有的流行文本编辑器一样,Vim 可以很好的编辑各种字符编码的文件,这当然包括 UCS-2、UTF-8 等流行的 Unicode 编码方式。然而不幸的是,和很多来自 Linux 世界的软件一样,这需要你自己动手设置。
Vim 有四个跟字符编码方式有关的选项,encoding、fileencoding、fileencodings、termencoding (这些选项可能的取值请 ......