Changeset View
Changeset View
Standalone View
Standalone View
include/stdio.h
Context not available. | |||||
#ifndef _STDIO_H_ | #ifndef _STDIO_H_ | ||||
#define _STDIO_H_ | #define _STDIO_H_ | ||||
#include <sys/cdefs.h> | #include <stddef.h> | ||||
imp: Doesn't this introduce unacceptable namespace pollution? Aren't we using the _foo.h files to… | |||||
cyAuthorUnsubmitted Not Done Inline ActionsWe may need to move the rsize_t definition then. I'll take a look at this. cy: We may need to move the rsize_t definition then. I'll take a look at this. | |||||
edUnsubmitted Not Done Inline ActionsIf the C standard allows <stdio.h> to define rsize_t, just copy-paste this from <stddef.h> into <stdio.h>: #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif If not, then simply use size_t in the prototype in the header file and rsize_t in the source file. That way you do get a compiler error if the two go out of sync. ed: If the C standard allows `<stdio.h>` to define `rsize_t`, just copy-paste this from `<stddef. | |||||
#include <sys/_null.h> | |||||
#include <sys/_types.h> | |||||
__NULLABILITY_PRAGMA_PUSH | __NULLABILITY_PRAGMA_PUSH | ||||
Context not available. | |||||
int getc(FILE *); | int getc(FILE *); | ||||
int getchar(void); | int getchar(void); | ||||
char *gets(char *); | char *gets(char *); | ||||
#if defined(__EXT1_VISIBLE) && __EXT1_VISIBLE == 1 | |||||
char *gets_s(char *, rsize_t); | |||||
#endif | |||||
void perror(const char *); | void perror(const char *); | ||||
int printf(const char * __restrict, ...); | int printf(const char * __restrict, ...); | ||||
int putc(int, FILE *); | int putc(int, FILE *); | ||||
Context not available. |
Doesn't this introduce unacceptable namespace pollution? Aren't we using the _foo.h files to specifically avoid it. The standard is quite strict about what's allowed to be defined, and all of stddef.h isn't in the list for stdio.h. This must be reverted before the commit.