I am attempting to lilypond 2.5 to OpenBSD. One of the problems I'm running into is that the BSDs don't have the fopencookie function and libio.h. The BSD equivalent is funopencookie. The offending files are flower/memory-stream.cc and .hh. I looked in the PHP codebase to see how they handle this problem. In main/streams.c, PHP has:

/* 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

Reply via email to