- 博客(4)
- 收藏
- 关注
原创 编写makefile文件中需要注意的事情
1. 请看下面代码 var-lost: export foo=bar echo "foo=[$$foo]" 上面代码执行后无法取到foo值,因为两行命令在两个不同的进程执行。一个解决办法是将两行命令写在一行,中间用分号分隔 var-kept: export foo=bar; echo "foo=[$$foo]" 另一个解决办法是在换行符前加反斜杠转义 va
2016-01-14 14:12:49
326
原创 mmap函数,对于存入结构化数据的操作,以及映射内存的操作
mmap(内存映射, memory, map)函数的作用是建立一段内存,使它能够被两个或更多个程序读写。 下面的程序主要分为三段: 第一段是写入数据到一个文件中, 第二个段是使用fread的传统方法来进行更改内容 第三段是使用mmap进行内存映射进行操作 #include #include #include #include #include typedef struct { int
2015-10-30 22:23:40
1029
原创 WSGI规范细则
1、应用程序对象必须接受两个固定参数,为了方便说明我们不妨把他们命名为 environ 和 start_response ,但并非必须取这个名字。服务器或gateway必须使用这两个参数来调用应用程序对象 ( 就象上面展示的那样, 像这样调用 result = application(environ,start_response) ) 2、environ 参数是个字典,其中包
2015-10-30 19:48:29
515
原创 linux目录扫描
这个程序用于Linux目录扫描 #include #include #include #include #include #include void printdir(char *dir, int depth) { DIR *dp; struct dirent *entry; struct stat statbuf; if((dp = opendir(dir)) == NULL)
2015-10-30 19:29:08
884
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅