Behöver hjälp med att bygga s3switch
Postat: 30 jul 2010, 23:10
Jag behöver ett urgammalt program för att sätta på S-video-utgången på min IBM Thinkpad T23 som heter s3switch. Problemet är att det inte funkar out of the box, man måste patcha programmet först. Det vill sig inte, jag har provat både att tanka källkoden direkt från http://www.probo.com/timr/savage40.html och att hämta den med apt-get source. Får dessa felmeddelanden oavsett om jag patchat koden eller inte:
Rader 304-306 i lrmi.c om det hjälper:
DEFAULT_VM86_FLAGS är definerat på rad 172:
Har ingen aning om hur jag går vidare. Och kommer programmet ens att fungera om man får igång det?
Kod: Markera allt
anton@atrus:~/src/s3switch/s3switch-0.0.20030423$ fakeroot debian/rules binary
dh_testdir
# Add here commands to compile the package.
/usr/bin/make CFLAGS="-Wall -g -O2"
make[1]: Går till katalogen "/home/anton/src/s3switch/s3switch-0.0.20030423"
gcc -Wall -g -O2 -c -o s3switch.o s3switch.c
s3switch.c: In function ‘print_current_state’:
s3switch.c:301: warning: format not a string literal and no format arguments
s3switch.c:313: warning: format not a string literal and no format arguments
gcc -Wall -g -O2 -c -o lrmi.o lrmi.c
lrmi.c: In function ‘set_regs’:
lrmi.c:305: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:305: error: (Each undeclared identifier is reported only once
lrmi.c:305: error: for each function it appears in.)
lrmi.c:305: error: ‘IOPL_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘run_vm86’:
lrmi.c:784: error: ‘VIF_MASK’ undeclared (first use in this function)
lrmi.c:784: error: ‘TF_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘LRMI_int’:
lrmi.c:873: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:873: error: ‘IOPL_MASK’ undeclared (first use in this function)
make[1]: *** [lrmi.o] Fel 1
make[1]: Lämnar katalogen "/home/anton/src/s3switch/s3switch-0.0.20030423"
make: *** [build-stamp] Fel 2
anton@atrus:~/src/s3switch/s3switch-0.0.20030423$ make
gcc -g -c -o lrmi.o lrmi.c
lrmi.c: In function ‘set_regs’:
lrmi.c:305: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:305: error: (Each undeclared identifier is reported only once
lrmi.c:305: error: for each function it appears in.)
lrmi.c:305: error: ‘IOPL_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘run_vm86’:
lrmi.c:784: error: ‘VIF_MASK’ undeclared (first use in this function)
lrmi.c:784: error: ‘TF_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘LRMI_int’:
lrmi.c:873: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:873: error: ‘IOPL_MASK’ undeclared (first use in this function)
make: *** [lrmi.o] Fel 1
Kod: Markera allt
context.vm.regs.eax = r->eax;
context.vm.regs.eflags = DEFAULT_VM86_FLAGS;
context.vm.regs.es = r->es;
Kod: Markera allt
#define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)