public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] <stdio.h>: Make fopencookie, vasprintf, asprintf available by default
@ 2023-04-06 15:03 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2023-04-06 15:03 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0d5cb2ae27c0a163c15e5222fb132bf9d026b14b
commit 0d5cb2ae27c0a163c15e5222fb132bf9d026b14b
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Apr 6 16:40:44 2023 +0200
<stdio.h>: Make fopencookie, vasprintf, asprintf available by default
FreeBSD makes these functions available by default, so we should
not treat them as GNU-specific and restrict them to _GNU_SOURCE.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diff:
---
libio/stdio.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libio/stdio.h b/libio/stdio.h
index 686c40f28d..45ddafdf20 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -42,7 +42,7 @@ __BEGIN_DECLS
#include <bits/types/FILE.h>
#include <bits/types/struct_FILE.h>
-#ifdef __USE_GNU
+#ifdef __USE_MISC
# include <bits/types/cookie_io_functions_t.h>
#endif
@@ -299,7 +299,7 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW
__attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
-#ifdef __USE_GNU
+#ifdef __USE_MISC
/* Create a new stream that refers to the given magic cookie,
and uses the given functions for input and output. */
extern FILE *fopencookie (void *__restrict __magic_cookie,
@@ -389,7 +389,7 @@ extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__THROWNL __attribute__ ((__format__ (__printf__, 3, 0)));
#endif
-#if __GLIBC_USE (LIB_EXT2)
+#if defined (__USE_MISC) || __GLIBC_USE (LIB_EXT2)
/* Write formatted output to a string dynamically allocated with `malloc'.
Store the address of the string in *PTR. */
extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-06 15:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 15:03 [glibc] <stdio.h>: Make fopencookie, vasprintf, asprintf available by default Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).