文件操作中的FLAG(O_RDONLY,O_WRONLY )的值

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
void main(void)
{
        printf("O_ACCMODE       %08x
",  O_ACCMODE               ) ; 
        printf("O_RDONLY        %08x
",  O_RDONLY                ) ; 
        printf("O_WRONLY        %08x
",  O_WRONLY                ) ; 
        printf("O_RDWR          %08x
",  O_RDWR                  ) ; 
        printf("O_CREAT         %08x
",  O_CREAT                 ) ; 
        printf("O_EXCL          %08x
",  O_EXCL                  ) ; 
        printf("O_NOCTTY        %08x
",  O_NOCTTY                ) ; 
        printf("O_TRUNC         %08x
",  O_TRUNC                 ) ; 
        printf("O_APPEND        %08x
",  O_APPEND                ) ; 
        printf("O_NONBLOCK      %08x
",  O_NONBLOCK              ) ; 
        printf("O_DSYNC         %08x
",  O_DSYNC                 ) ; 
        printf("FASYNC          %08x
",  FASYNC                  ) ; 
        printf("O_NOFOLLOW      %08x
",  O_NOFOLLOW              ) ; 

}
/*
O_ACCMODE       00000003
O_RDONLY        00000000
O_WRONLY        00000001
O_RDWR          00000002
O_CREAT         00000040
O_EXCL          00000080
O_NOCTTY        00000100
O_TRUNC         00000200
O_APPEND        00000400
O_NONBLOCK      00000800
O_DSYNC         00001000
FASYNC          00002000
O_NOFOLLOW      00020000
*/
原文地址:https://www.cnblogs.com/mylinux/p/5301708.html