fruitjam-doom/opl
Rodrigo Rebello 2e855ffeb6 opl: limit use of ioperm/inb/outb to x86 architecture
The use of I/O ports in the Linux driver to directly control OPL chips
is x86 specific and only really makes sense for x86-based PC's with
compatible hardware.

For some architectures (e.g. ARM), ioperm, inb and outb do exist and are
detected by the configure script (via AC_CHECK_FUNCS(ioperm)), but their
use is inappropriate in these cases and should be avoided.

In some other scenarios, like when using a GNU toolchain + uClibc for
PowerPC, the build even fails with the following error:

  opl_linux.c:26:20: fatal error: sys/io.h: No such file or directory

That is so because ioperm() is exported by uClibc and gets detected by
configure, which enables the "Linux" driver via definition of
HAVE_IOPERM, but in practice 'sys/io.h' is missing for ppc (inb/outb is
not implemented, and the call to ioperm() would return EIO anyway).

So, besides testing for HAVE_IOPERM, also test if either __i386__ or
__x86_64__ are defined before enabling this OPL driver.
2015-11-06 12:14:01 -02:00
..
examples Add missing #includes. 2015-04-10 23:42:01 -04:00
.gitignore Add OPL-TODO to dist, set svn:ignore properties. 2010-03-08 18:52:59 +00:00
dbopl.c Clean up file headers. 2014-05-05 00:20:54 -04:00
dbopl.h opl: Add missing function prototype to header. 2015-06-08 20:04:14 -04:00
ioperm_sys.c Clean up file headers. 2014-05-05 00:20:54 -04:00
ioperm_sys.h Clean up file headers. 2014-05-05 00:20:54 -04:00
Makefile.am Hook DBOPL into OPL library and remove FMOPL. Does not generate any 2010-08-15 14:57:37 +00:00
opl.c opl: limit use of ioperm/inb/outb to x86 architecture 2015-11-06 12:14:01 -02:00
opl.h opl: Change result from OPL_Init() to an enum. 2015-06-08 21:12:26 -04:00
opl_internal.h opl: Use uint64_t for microsecond times. 2014-10-07 22:47:29 -04:00
opl_linux.c opl: limit use of ioperm/inb/outb to x86 architecture 2015-11-06 12:14:01 -02:00
opl_obsd.c opl: Add API to adjust tempo. 2014-05-10 14:00:41 -04:00
opl_queue.c opl: Change library to use us instead of ms. 2014-05-11 00:14:04 -04:00
opl_queue.h opl: Change library to use us instead of ms. 2014-05-11 00:14:04 -04:00
opl_sdl.c Fix tab character. 2015-05-30 13:06:47 -04:00
opl_timer.c opl: Change library to use us instead of ms. 2014-05-11 00:14:04 -04:00
opl_timer.h opl: Change library to use us instead of ms. 2014-05-11 00:14:04 -04:00
opl_win32.c opl: Add API to adjust tempo. 2014-05-10 14:00:41 -04:00