summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-04-29 21:32:48 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-04-29 21:33:02 +1000
commitc1ebd2caa4331132dc039b92fb1971b962354df3 (patch)
treed44f5471ebc23c74dcb477a4d86aa849ecb69527
parent1b1d05bb257b26e131fd6a3cf9db9c4a0af32cba (diff)
downloadflac-c1ebd2caa4331132dc039b92fb1971b962354df3.tar.gz
Two minor compiled fixes for OS/2.
Patch from Dave Yeo <dave.r.yeo@gmail.com>.
-rw-r--r--configure.ac5
-rw-r--r--src/flac/utils.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 88e0995f..c03e36b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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=
;;
diff --git a/src/flac/utils.c b/src/flac/utils.c
index 85a16f08..e908706b 100644
--- a/src/flac/utils.c
+++ b/src/flac/utils.c
@@ -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;