You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SFIO's fclose.c, getchar.c and probably also scanf.c, vscanf.c and gets.c fail because stdio headers are missing:
fclose.c: In function 'fclose':
fclose.c:20:44: error: 'stdin' undeclared (first use in this function)
20 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~
fclose.c:2:1: note: 'stdin' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
1 | #include "sfstdio.h"
+++ |+#include <stdio.h>
2 |
fclose.c:20:44: note: each undeclared identifier is reported only once for each function it appears in
20 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~
fclose.c:20:58: error: 'stdout' undeclared (first use in this function)
20 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~~
fclose.c:20:58: note: 'stdout' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
fclose.c:20:73: error: 'stderr' undeclared (first use in this function)
20 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~~
fclose.c:20:73: note: 'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
/* While building the compatible stdio interface, we don't want <stdio.h>
** to be included. Fortunately, these files tend to be protected by a single
** macro defined at the top of each file to prevent multiple inclusion.
** This header file defines the same macros here.
Therefore including <stdio.h> doesn't improve the situation:
fclose.c: In function 'fclose':
fclose.c:21:44: error: 'stdin' undeclared (first use in this function)
21 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~
fclose.c:3:1: note: 'stdin' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
2 | #include <stdio.h>
+++ |+#include <stdio.h>
3 |
fclose.c:21:44: note: each undeclared identifier is reported only once for each function it appears in
21 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~
fclose.c:21:58: error: 'stdout' undeclared (first use in this function)
21 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~~
fclose.c:21:58: note: 'stdout' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
fclose.c:21:73: error: 'stderr' undeclared (first use in this function)
21 | if((rv = sfclose(sf)) >= 0 && f != stdin && f != stdout && f != stderr)
| ^~~~~~
fclose.c:21:73: note: 'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
How do I fix this?
The text was updated successfully, but these errors were encountered:
gcc 12.2
SFIO's fclose.c, getchar.c and probably also scanf.c, vscanf.c and gets.c fail because stdio headers are missing:
Therefore including <stdio.h> doesn't improve the situation:
How do I fix this?
The text was updated successfully, but these errors were encountered: