Chinaunix
标题:
O_RDWR符号常量的定义在哪
[打印本页]
作者:
xi2008wang
时间:
2007-12-10 11:00
标题:
O_RDWR符号常量的定义在哪
APUE说在fcntl.h
但是怎么找不到啊.
作者:
xi2008wang
时间:
2007-12-10 11:03
Linux AS 4
作者:
net_robber
时间:
2007-12-10 11:08
ctags,
作者:
gucuiwen
时间:
2007-12-10 11:11
没仔细看吧:
/* Get the definitions of O_*, F_*, FD_*: all the
numbers and flag bits for `open', `fcntl', et al. */
#include <bits/fcntl.h>
以上内容是在fcntl.h里发现的。就是说,fcntl.h包含了bits/fcntl.h
头文件包含另一个头文件
O_XXXX系列的定义在:
/usr/include/bits/fcntl.h中
而
/usr/include/fcntl.h包含了/usr/include/bits/fcntl.h
bits/fcntl.h的部分内容:
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
作者:
xi2008wang
时间:
2007-12-10 11:24
是没仔细看,只查找了一下...
我知错了
作者:
hcu5555
时间:
2012-10-11 15:24
受教了。哈哈。
作者:
linux_c_py_php
时间:
2012-10-12 20:57
不用找源文件, 学会man fcntl.h.
作者:
zjutjsj1004
时间:
2013-04-06 11:40
我的为什么没有啊
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2