I'm trying to port this old Linux tool to FreeBSD: http://outflux.net/software/pkgs/EPROM/
It controls an EPROM burner through the parallel port. But it uses inb, outb and ioperm functions and is not building properly on my FreeBSD-7.1 server. I get the error "cannot find sys/io.h", and when I modify that to ioctl.h instead, I get a new set of errors:
Can someone help me figure a quick fix to this? I know there is a parallel port library that is supposed to simplify this but I don't want to re-code the application if there's just a magic header file and library I'm missing.
It controls an EPROM burner through the parallel port. But it uses inb, outb and ioperm functions and is not building properly on my FreeBSD-7.1 server. I get the error "cannot find sys/io.h", and when I modify that to ioctl.h instead, I get a new set of errors:
Code:
gcc -o 27c801 27c801.c -Wall -O2 -fomit-frame-pointer
27c801.c: In function 'write_from_file':
27c801.c:166: warning: implicit declaration of function 'outb'
27c801.c:229: warning: implicit declaration of function 'inb'
27c801.c: In function 'startup':
27c801.c:429: warning: implicit declaration of function 'ioperm'
/var/tmp//cc5OEHEF.o(.text+0xa6): In function `shutdown':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0xcd): In function `shutdown':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0xf4): In function `shutdown':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x11b): In function `shutdown':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x142): In function `shutdown':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x157): more undefined references to `outb' follow
/var/tmp//cc5OEHEF.o(.text+0x3d2): In function `read_to_file':
: undefined reference to `inb'
/var/tmp//cc5OEHEF.o(.text+0x40f): In function `read_to_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x436): In function `read_to_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x45d): In function `read_to_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x532): In function `read_to_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x559): In function `read_to_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x580): more undefined references to `outb' follow
/var/tmp//cc5OEHEF.o(.text+0x6bc): In function `startup':
: undefined reference to `ioperm'
/var/tmp//cc5OEHEF.o(.text+0x6d4): In function `startup':
: undefined reference to `inb'
/var/tmp//cc5OEHEF.o(.text+0x6f9): In function `startup':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x720): In function `startup':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x747): In function `startup':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x76e): In function `startup':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x795): In function `startup':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x7aa): more undefined references to `outb' follow
/var/tmp//cc5OEHEF.o(.text+0x1049): In function `write_from_file':
: undefined reference to `inb'
/var/tmp//cc5OEHEF.o(.text+0x1072): In function `write_from_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x10e2): In function `write_from_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x1109): In function `write_from_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x1130): In function `write_from_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x1157): In function `write_from_file':
: undefined reference to `outb'
/var/tmp//cc5OEHEF.o(.text+0x117e): more undefined references to `outb' follow
*** Error code 1
Stop in /root/27c801-programmer-1.2.
Can someone help me figure a quick fix to this? I know there is a parallel port library that is supposed to simplify this but I don't want to re-code the application if there's just a magic header file and library I'm missing.