Re: [mpg123-devel] Please test new network code in/out of mpg123 (now with HTTPS support)!
Brought to you by:
sobukus
From: Dave Y. <dav...@gm...> - 2022-05-14 02:28:15
|
On 05/13/22 08:44 AM, Thomas Orgis wrote: > Am Fri, 13 May 2022 07:46:11 -0700 > schrieb Dave Yeo <dav...@gm...>: > >> Strictly speaking, __OS2__ covers all compilers, __EMX__ covers all >> versions of GCC, and __KLIBC__ covers the current GCC/libc (a mostly >> compatible rewrite of EMX's libc using BSD licensing rather then GPL) >> and GCC. > > So this looks like we should use __OS2__. Is it identical with the > plain OS2 (no underscores) that we have littered on the source right > now? The CFLAGS has -DOS2 in it, probably put there by configure, so it is fine > >>> Also, this snippet in local.c: >>> >>> #ifdef __EMX__ >>> /* Special ways for OS/2 EMX */ >>> #include <stdlib.h> >>> #else >>> /* POSIX stuff */ >>> #ifdef HAVE_TERMIOS >>> #include <termios.h> >>> #include <sys/ioctl.h> >>> #endif >>> #endif >>> >>> Does that make sense, still (if anytime)? Do you have termios and >>> terminal control in mpg123? >> >> It worked fine with EMX, now tcsetattr() is missing so we get, >> [../mpg123.svn/src/term.c:term_init():154] error: failed to get terminal >> attributes: Invalid argument > > It worked with EMX? But we explicitly disabled termios there? OK, it _should_ have worked with EMX as it had better term support. Not sure why it was disabled, happened before my time. > > So, should I just drop this ifdef and use HAVE_TERMIOS as-is, and you > eventually sort out the runtime problem with tcsetattr(). Or even more: > Could terminal control work for you (in the end, it's just > select(STDIN_FILENO)), just not with meddling with the attributes? > Works isatty() on OS/2? We could use that for more proper terminal > detection than messing with attributes. I think using isatty() would be fine, or using HAVE_TERMIOS as is which seems fine as well. Thanks, Dave |