[Bug 273711] off64_t abuse in <stdio.h> for native API
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 273711] off64_t abuse in <stdio.h> for native API"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 15 Sep 2023 14:57:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273711
Warner Losh <imp@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |imp@FreeBSD.org
--- Comment #2 from Warner Losh <imp@FreeBSD.org> ---
So.... these should be in the _BSD_VISIBLE namespace. They aren't today, which
is why we have the problem...
diff --git a/include/stdio.h b/include/stdio.h
index b7c412c81da7..9881b3f07329 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -415,6 +415,7 @@ FILE *funopen(const void *,
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+#if __BSD_VISIBLE
typedef __ssize_t cookie_read_function_t(void *, char *, size_t);
typedef __ssize_t cookie_write_function_t(void *, const char *, size_t);
typedef int cookie_seek_function_t(void *, off64_t *, int);
@@ -426,6 +427,7 @@ typedef struct {
cookie_close_function_t *close;
} cookie_io_functions_t;
FILE *fopencookie(void *, const char *, cookie_io_functions_t);
+#endif
/*
* Portability hacks. See <sys/types.h>.
should do fix the problem.
--
You are receiving this mail because:
You are the assignee for the bug.