[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OpenBSD fix for fopencookie
From: |
Jan Nieuwenhuizen |
Subject: |
Re: OpenBSD fix for fopencookie |
Date: |
Sun, 06 Mar 2005 10:22:11 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Matt Jibson writes:
> The current CVS gives a much nicer error:
Thanks. I've added the patch below to CVS. Can you check if that
works for you?
Jan.
--- libc-extension.hh 28 feb 2005 20:03:16 +0100 1.26
+++ libc-extension.hh 06 mrt 2005 10:14:05 +0100
@@ -53,6 +53,8 @@ extern "C" {
#include <libio.h>
#else
+#if ! HAVE_FUNOPEN
+
#define cookie_io_functions_t le_cookie_io_functions_t
typedef struct
{
@@ -62,6 +64,17 @@ extern "C" {
int (*close) (void *);
} cookie_io_functions_t;
+#else
+
+ typedef struct
+ {
+ int (*read) (void *, char *, int);
+ int (*write) (void *, char const *, int);
+ fpos_t (*seek) (void *, fpos_t, int);
+ int (*close) (void *);
+ } cookie_io_functions_t;
+
+#endif /* ! HAVE_FUNOPEN */
#endif /* ! HAVE_LIBIO_H */
FILE *fopencookie (void *cookie, char const *modes,
@@ -87,9 +100,7 @@ extern "C" {
#define putc handle_cookie_io_putc
#endif /* ALIAS_FILE_TO_FILECOOKIE */
-
#endif /* ! HAVE_FUNOPEN */
-
#endif /* ! HAVE_FOPENCOOKIE */
#ifdef __cplusplus
--- libc-extension.cc 01 mrt 2005 08:53:17 +0100 1.29
+++ libc-extension.cc 06 mrt 2005 10:06:01 +0100
@@ -164,6 +164,7 @@ extern "C" {
FILE *
fopencookie (void *cookie, char const *mode, cookie_io_functions_t fun)
{
+ (void) mode;
return funopen (cookie, fun.read, fun.write, fun.seek, fun.close);
}
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
- OpenBSD fix for fopencookie, Matt Jibson, 2005/03/05
- OpenBSD fix for fopencookie, Han-Wen Nienhuys, 2005/03/05
- Re: OpenBSD fix for fopencookie, Matt Jibson, 2005/03/05
- Re: OpenBSD fix for fopencookie, Matt Jibson, 2005/03/06
- Re: OpenBSD fix for fopencookie,
Jan Nieuwenhuizen <=
- Re: OpenBSD fix for fopencookie, Matt Jibson, 2005/03/06
- Re: OpenBSD fix for fopencookie, Jan Nieuwenhuizen, 2005/03/06
- Re: OpenBSD fix for fopencookie, Matt Jibson, 2005/03/06
- Re: OpenBSD fix for fopencookie, Jan Nieuwenhuizen, 2005/03/06
- Re: OpenBSD fix for fopencookie, Matt Jibson, 2005/03/06