diff --git a/configure.ac b/configure.ac index 12401f00b4730e00436d5214cb7d48b9caaed6e4..5a17cc1a13ac1b9fd0adc1fe6ed023d24cf35c03 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) ]) # Functions and headers -AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l) +AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l setlinebuf) AC_CHECK_HEADERS(unistd.h sys/mman.h xlocale.h) # Compiler flags @@ -355,9 +355,7 @@ if $have_freetype; then AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) save_libs=$LIBS LIBS="$LIBS $FREETYPE_LIBS" - AC_CHECK_FUNCS(FT_Get_Var_Blend_Coordinates) - AC_CHECK_FUNCS(FT_Set_Var_Blend_Coordinates) - AC_CHECK_FUNCS(FT_Done_MM_Var) + AC_CHECK_FUNCS(FT_Get_Var_Blend_Coordinates FT_Set_Var_Blend_Coordinates FT_Done_MM_Var) LIBS=$save_libs fi AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) diff --git a/util/options.cc b/util/options.cc index d9486f8a8fc6a7ec4062ef5acb02245c8e0dd176..6d8064b904a05a2874602c2418f1bc1a71948c4a 100644 --- a/util/options.cc +++ b/util/options.cc @@ -780,7 +780,11 @@ text_options_t::get_line (unsigned int *len) gs = g_string_new (nullptr); } - setvbuf(fp, NULL, _IOLBF, BUFSIZ); //setlinebuf (fp); +#ifdef HAVE_SETLINEBUF + setlinebuf (fp); +#else + setvbuf(fp, NULL, _IOLBF, BUFSIZ); +#endif g_string_set_size (gs, 0); char buf[BUFSIZ]; @@ -819,7 +823,11 @@ output_options_t::get_file_handle (void) fail (false, "Cannot open output file `%s': %s", g_filename_display_name (output_file), strerror (errno)); - setvbuf(fp, NULL, _IOLBF, BUFSIZ); //setlinebuf (fp); +#ifdef HAVE_SETLINEBUF + setlinebuf (fp); +#else + setvbuf(fp, NULL, _IOLBF, BUFSIZ); +#endif return fp; }