3
我正在查找將errno整數轉換爲其名稱的API。Linux,將errno轉換爲名稱
例如:
int fd;
if((fd = open(path, O_RDONLY)) == -1)
printf("error: %d %s %s\n", errno, strerror(errno) ERRNONAME(errno));
所以,ERRNONAME將產生一個名稱,如EINVAL
,EPERM
,等這可能嗎?
可能的重複[如何將UNIX中的errno轉換爲相應的字符串?](http://stackoverflow.com/questions/1546882/how-to-convert-errno-in- UNIX到相應串) – hammar