deprecate gets and tmpnam

For #15515

As mentionned in the ticket, we may also want to hide the symbols
altogether from libroot for newer API/ABI versions, unless we still want
to provide C89/C99/C++98/C++11 compatibility, in which case we still
need them around.

Change-Id: I0ee267fb6c4c2f4bae9b1ba6f68e2bcefc399a7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2061
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2020-01-03 03:35:04 +00:00
committed by waddlesplash
parent 2c17ecf993
commit 92e9211d7b
2 changed files with 11 additions and 4 deletions
+11 -2
View File
@@ -32,7 +32,10 @@
#define L_ctermid 32
#define L_cuserid 32
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L) \
|| (defined(__cplusplus) && __cplusplus < 201402L)
#define L_tmpnam 512
#endif
#define P_tmpdir "/tmp/"
@@ -160,7 +163,10 @@ extern int getchar(void);
extern int getchar_unlocked(void);
extern int fgetc(FILE *stream);
extern int fgetc_unlocked(FILE *stream);
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L) \
|| (defined(__cplusplus) && __cplusplus < 201402L)
extern char *gets(char *buffer);
#endif
extern char *fgets(char *string, int stringLength, FILE *stream);
extern char *fgets_unlocked(char *string, int stringLength, FILE *stream);
@@ -192,10 +198,13 @@ extern char *ctermid(char *controllingTerminal);
extern char *cuserid(char *s);
/* temporary files */
extern char *tempnam(char const *path, char const *prefix);
extern FILE *tmpfile(void);
extern char *tmpnam(char *nameBuffer);
extern char *tmpnam_r(char *nameBuffer);
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L) \
|| (defined(__cplusplus) && __cplusplus < 201402L)
extern char *tempnam(char const *path, char const *prefix);
extern char *tmpnam(char *nameBuffer);
#endif
#include <stdio_post.h>
-2
View File
@@ -70,7 +70,6 @@ extern void setbuf (FILE *file, char *buff);
extern int setvbuf(FILE *file, char *buff, int mode, size_t size);
extern int sscanf(char const *str, char const *format, ...);
extern FILE *tmpfile(void);
extern char *tmpnam(char *nameBuffer);
extern int ungetc(int c, FILE *stream);
extern int vscanf(char const *format, va_list ap);
extern int vsscanf(char const *str, char const *format, va_list ap);
@@ -81,7 +80,6 @@ extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE*);
extern int getc(FILE *);
extern char *gets(char *);
extern int getw(FILE *);
extern int getchar(void);
extern int putc(int, FILE *);