summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;