Two minor compiled fixes for OS/2.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 29 Apr 2013 11:32:48 +0000 (21:32 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 29 Apr 2013 11:33:02 +0000 (21:33 +1000)
Patch from Dave Yeo <dave.r.yeo@gmail.com>.

configure.ac
src/flac/utils.c

index 88e0995..c03e36b 100644 (file)
@@ -126,12 +126,15 @@ AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
 
 os_is_windows=no
 case "$host" in
-       *-*-cygwin|*mingw*|*emx*)
+       *-*-cygwin|*mingw*)
                # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2
                LT_NO_UNDEFINED="-no-undefined"
                CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS"
                os_is_windows=yes
                ;;
+       *emx*)
+               LT_NO_UNDEFINED="-no-undefined"
+               ;;
        *)
                LT_NO_UNDEFINED=
                ;;
index 85a16f0..e908706 100644 (file)
@@ -173,6 +173,10 @@ int get_console_width(void)
        int width = 80;
 #ifdef _WIN32
        width = win_get_console_width();
+#elif defined __EMX__
+        int s[2];
+        _scrsize (s);
+        width = s[0];
 #else
        struct winsize w;
        if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col;