SOURCES: svgalib-no-sys-io.patch (NEW) - build without nohelper su...

qboosh qboosh at pld-linux.org
Thu Dec 8 15:18:25 CET 2005


Author: qboosh                       Date: Thu Dec  8 14:18:25 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- build without nohelper support on archs without <sys/io.h>
- emulate outsb() on archs (i.e. alpha) with <sys/io.h> without outsb()

---- Files affected:
SOURCES:
   svgalib-no-sys-io.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/svgalib-no-sys-io.patch
diff -u /dev/null SOURCES/svgalib-no-sys-io.patch:1.1
--- /dev/null	Thu Dec  8 15:18:25 2005
+++ SOURCES/svgalib-no-sys-io.patch	Thu Dec  8 15:18:20 2005
@@ -0,0 +1,119 @@
+--- svgalib-1.9.23/src/vga_helper.c.orig	2005-07-10 13:18:32.000000000 +0200
++++ svgalib-1.9.23/src/vga_helper.c	2005-12-08 15:10:56.000000000 +0100
+@@ -1,15 +1,32 @@
++#if defined(__i386__) || defined(__x86_64__)
++#  define HAVE_SYS_IO 1
++#  define HAVA_OUTSB 1
++#elif defined(__alpha__)
++#  define HAVE_SYS_IO 1
++#endif
++
++#ifdef HAVE_SYS_IO
+ #include <sys/io.h>
++#endif
+ #include <sys/ioctl.h>
+ #include "svgalib_helper.h"
+ #include "libvga.h"
+ 
+ void __svgalib_port_rep_outb(unsigned char* string, int length, int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
++#  ifdef HAVE_OUTSB
+     outsb(port, string, length);
++#  else
++    int i;
++    for(i = 0; i < length ; i++)
++	    outb(string[i], port);
++#  endif
+   }
+   else
++#endif
+   {
+     io_string_t iostr;
+ 
+@@ -23,11 +40,13 @@
+ 
+ void __svgalib_port_out(int value, int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     outb(value, port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
+@@ -39,11 +58,13 @@
+ 
+ void __svgalib_port_outw(int value, int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     outw(value, port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
+@@ -55,11 +76,13 @@
+ 
+ void __svgalib_port_outl(int value, int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     outl(value, port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
+@@ -71,11 +94,13 @@
+ 
+ int __svgalib_port_in(int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     return inb(port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
+@@ -88,11 +113,13 @@
+ 
+ int __svgalib_port_inw(int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     return inw(port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
+@@ -105,11 +132,13 @@
+ 
+ int __svgalib_port_inl(int port)
+ {
++#ifdef HAVE_SYS_IO
+   if(__svgalib_nohelper)
+   {
+     return inl(port);
+   }
+   else
++#endif
+   {
+     io_t iov;
+     
================================================================



More information about the pld-cvs-commit mailing list