]> git.donarmstrong.com Git - lilypond.git/commitdiff
* flower/libc-extension.cc:
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 6 Mar 2005 09:22:02 +0000 (09:22 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 6 Mar 2005 09:22:02 +0000 (09:22 +0000)
* flower/include/libc-extension.hh: [Open]BSD fixes for
cookie/funopen declarations.

ChangeLog
flower/include/libc-extension.hh
flower/libc-extension.cc

index 04306f3141aec3f07f6698621d0ad686f978be1b..e1c0284a75fa692c10de70592ea0ee3b47ed39b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 11ee88cef0ffd50491d954ffa3dd85a1b22a9cf0..b3da0e54b2caf84215aad70bfefb6d4c0dc3ebb5 100644 (file)
@@ -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
index a5085047c315e64c047a93bd4cb1fdd407efc392..6b11b1560f7627539d47cb7f02591f856d89fbbe 100644 (file)
@@ -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);
   }