+2005-03-06 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * flower/libc-extension.cc:
+ * flower/include/libc-extension.hh: [Open]BSD fixes for
+ cookie/funopen declarations.
+
2005-03-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
* buildscripts/gen-emmentaler-scripts.py (outdir): capitalize
#include <libio.h>
#else
+#if ! HAVE_FUNOPEN
+
#define cookie_io_functions_t le_cookie_io_functions_t
typedef struct
{
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,
#define putc handle_cookie_io_putc
#endif /* ALIAS_FILE_TO_FILECOOKIE */
-
#endif /* ! HAVE_FUNOPEN */
-
#endif /* ! HAVE_FOPENCOOKIE */
#ifdef __cplusplus
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);
}