From: Behdad Esfahbod Date: Thu, 31 Jan 2013 23:18:05 +0000 (-0500) Subject: Use setmode() instead of _setmode() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc76449f51f20491a4540b4f240f5a3e0dcb20fe;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Use setmode() instead of _setmode() Looks like Cygwin / MSVC declare it that way, and it still works on MinGW32 cross. --- diff --git a/config.h.in b/config.h.in index 4b5c99a..fe2ebcb 100644 --- a/config.h.in +++ b/config.h.in @@ -81,6 +81,9 @@ /* Have sched_yield */ #undef HAVE_SCHED_YIELD +/* Define to 1 if you have the `setmode' function. */ +#undef HAVE_SETMODE + /* Have Solaris __machine_*_barrier and atomic_* operations */ #undef HAVE_SOLARIS_ATOMIC_OPS @@ -117,9 +120,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `_setmode' function. */ -#undef HAVE__SETMODE - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR diff --git a/configure.ac b/configure.ac index 202bef9..40e7837 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ dnl GOBJECT_INTROSPECTION_CHECK([0.9.0]) dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) # Functions and headers -AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap _setmode isatty) +AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap setmode isatty) AC_CHECK_HEADERS(unistd.h sys/mman.h io.h) # Compiler flags diff --git a/util/options.cc b/util/options.cc index 17ad8e6..c9deb0d 100644 --- a/util/options.cc +++ b/util/options.cc @@ -414,7 +414,7 @@ font_options_t::get_font (void) const GString *gs = g_string_new (NULL); char buf[BUFSIZ]; #ifdef HAVE__SETMODE - _setmode (fileno (stdin), _O_BINARY); + setmode (fileno (stdin), _O_BINARY); #endif while (!feof (stdin)) { size_t ret = fread (buf, 1, sizeof (buf), stdin); diff --git a/util/options.hh b/util/options.hh index ad925b2..298a3f2 100644 --- a/util/options.hh +++ b/util/options.hh @@ -44,7 +44,7 @@ #include /* for isatty() */ #endif #ifdef HAVE_IO_H -#include /* for _setmode() under Windows */ +#include /* for setmode() under Windows */ #endif #include