From c76934a7ec03a1df900ac9902f4a6a44f22bed0f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 28 Feb 2005 19:06:10 +0000 Subject: [PATCH] * flower/memory-stream.cc: * flower/libc-extension.cc: Remove obsolete #undefs. * flower/include/libc-extension.hh: Bugfix for BSD, place #ifdef more carefully. --- ChangeLog | 8 ++++++++ flower/include/libc-extension.hh | 9 ++++++--- flower/libc-extension.cc | 7 ------- flower/memory-stream.cc | 1 - 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c59d0d0189..9fadc9a6d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-02-28 Jan Nieuwenhuizen + + * flower/memory-stream.cc: + * flower/libc-extension.cc: Remove obsolete #undefs. + + * flower/include/libc-extension.hh: Bugfix for BSD, place #ifdef + more carefully. + 2005-02-28 Han-Wen Nienhuys * make/lilypond.fedora.spec.in (Requires): add GS 8.15 as diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index 5ca5a1f579..11ee88cef0 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -53,8 +53,6 @@ extern "C" { #include #else -#ifdef ALIAS_FILE_TO_FILECOOKIE - #define cookie_io_functions_t le_cookie_io_functions_t typedef struct { @@ -75,7 +73,11 @@ extern "C" { int handle_cookie_io_fprintf (FILE *file, char const *format, ...); int handle_cookie_io_putc (int c, FILE *file); -/* FIXME: ttftool uses fclose fopencookie fprintf and putc only... */ +/* FIXME: ttftool uses fclose fopencookie fprintf and putc only. if + ALIAS_FILE_TO_FILECOOKIE, blondly redefine those functions + to wrappers that check for and handle Memory_out_stream. */ +#ifdef ALIAS_FILE_TO_FILECOOKIE + #define fclose handle_cookie_io_fclose #define fprintf handle_cookie_io_fprintf #ifdef putc @@ -83,6 +85,7 @@ extern "C" { #undef putc #endif #define putc handle_cookie_io_putc + #endif /* ALIAS_FILE_TO_FILECOOKIE */ #endif /* ! HAVE_FUNOPEN */ diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 8ced60f22c..48b6235a0e 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -192,7 +192,6 @@ extern "C" { return 0; } -#undef fclose int handle_cookie_io_fclose (FILE *file) { @@ -201,7 +200,6 @@ extern "C" { return fclose (file); } -#undef fprintf int handle_cookie_io_fprintf (FILE *file, char const *format, ...) { @@ -220,11 +218,6 @@ extern "C" { return i; } -#ifdef std_putc -#define putc std_putc -#else -#undef putc -#endif int handle_cookie_io_putc (int c, FILE *file) { diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index e33ed449e3..30e2453fa4 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -44,7 +44,6 @@ Memory_out_stream::Memory_out_stream () file_ = fopencookie ((void*) this, "w", functions_); } -#undef fclose Memory_out_stream::~Memory_out_stream () { if (file_) -- 2.39.5