get the errno value
This commit is contained in:
parent
cf443e62b5
commit
78ea32b3d9
@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#define BUFFER_SIZE 256
|
#define BUFFER_SIZE 256
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ int main()
|
|||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
perror("fopen failed.");
|
perror("fopen failed.");
|
||||||
printf("errno = %d\n", errno);
|
printf("errno = %d\n", __errno());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user