xun*_*lin 7 c c++ linux gcc header-files
我写了包含fcntl.h文件的ac程序.我搜索文件并获得如下结果:
[xunyl@localhost csapp]$ find /usr/include/ -name "fcntl.h"
/usr/include/asm/fcntl.h
/usr/include/asm-generic/fcntl.h
/usr/include/linux/fcntl.h
/usr/include/sys/fcntl.h
/usr/include/bits/fcntl.h
/usr/include/fcntl.h
[xunyl@localhost csapp]$ grep -rn "O_RDONLY" /usr/include/
/usr/include/asm-generic/fcntl.h:19:#define O_RDONLY 00000000
/usr/include/linux/cdrom.h:32: * - drive = open("/dev/cdrom", O_RDONLY);
/usr/include/linux/cdrom.h:33: * + drive = open("/dev/cdrom", O_RDONLY | O_NONBLOCK);
...
Run Code Online (Sandbox Code Playgroud)
/usr/include/asm-generic/fcntl.h当我#include <fcntl.h>输入程序时,我发现了gcc调用.我只是想知道gcc如何确定应该调用哪个"fcntl.h".是否有任何电话订单或优先顺序?