From 0f4131a7539032fbf30abd9b907b8d46c6ac73f1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 6 Mar 2005 21:07:56 +0000 Subject: [PATCH] * flower/libc-extension.cc: * flower/include/libc-extension.hh: [Open]BSD simply cast cookie/funopen declarations. --- ChangeLog | 4 ++++ flower/include/libc-extension.hh | 2 +- flower/libc-extension.cc | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b002381144..9174caa8c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-03-06 Jan Nieuwenhuizen + * flower/libc-extension.cc: + * flower/include/libc-extension.hh: [Open]BSD simply cast + cookie/funopen declarations. + * stepmake/aclocal.m4: Check for libkpathsea.so. * kpath-guile/kpath.c (ly_kpathsea_expand_variable): Use diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index b3da0e54b2..9978e237c3 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -53,7 +53,7 @@ extern "C" { #include #else -#if ! HAVE_FUNOPEN +#if 1 //! HAVE_FUNOPEN #define cookie_io_functions_t le_cookie_io_functions_t typedef struct diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 6b11b1560f..b6b32a31cd 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -165,7 +165,16 @@ extern "C" { fopencookie (void *cookie, char const *mode, cookie_io_functions_t fun) { (void) mode; +#if 0 return funopen (cookie, fun.read, fun.write, fun.seek, fun.close); +#else + return funopen (cookie, + (int (*) (void *, char *, int)) fun.read, + (int (*) (void *, char const *, int)) fun.write, + (fpos_t (*) (void *, fpos_t, int)) fun.seek, + (int (*) (void *)) fun.close); + +#endif } #else /* ! HAVE_FUNOPEN */ -- 2.39.2