/* Under BSD, emulate fopencookie using funopen */ #if HAVE_FUNOPEN typedef struct { int (*reader)(void *, char *, int); int (*writer)(void *, const char *, int); fpos_t (*seeker)(void *, fpos_t, int); int (*closer)(void *); } COOKIE_IO_FUNCTIONS_T;
FILE *fopencookie(void *cookie, const char *mode, COOKIE_IO_FUNCTIONS_T *funcs)
{
return funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer);
}
# define HAVE_FOPENCOOKIE 1
# define PHP_STREAM_COOKIE_FUNCTIONS &stream_cookie_functions
#elif HAVE_FOPENCOOKIE
# define PHP_STREAM_COOKIE_FUNCTIONS stream_cookie_functions
#endif
[...]
#if HAVE_FOPENCOOKIE
static COOKIE_IO_FUNCTIONS_T stream_cookie_functions =
{
stream_cookie_reader, stream_cookie_writer,
stream_cookie_seeker, stream_cookie_closer
};
#else
/* TODO: use socketpair() to emulate fopencookie, as suggested by Hartmut ? */
#endif
------
I have tried figure out how to make these modifications work with lilypond, but I'm not versed enough in this type of C++ to get it to work. Could someone help me out with fixes to flower/memory-stream.cc and .hh so that I can complete the lilypond port? Thanks.
-Matt Jibson
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel