tslib on GNU/Hurd
Hi folks,
Another partial patch over my head. I got further by adding --enable-input=no to configure in
debian/rules and the following patch.
However, now it is including the following:
linux/vt.h
linux/kd.h
linux/fb.h
So I am thinking tslib should be not-for-us?
Thanks,
Barry deFreese
Index: tslib-1.0/tests/fbutils.h
===================================================================
--- tslib-1.0.orig/tests/fbutils.h 2012-06-13 23:38:27.000000000 +0000
+++ tslib-1.0/tests/fbutils.h 2012-06-13 23:57:45.000000000 +0000
@@ -13,7 +13,7 @@
#ifndef _FBUTILS_H
#define _FBUTILS_H
-#include <asm/types.h>
+#include <stdint.h>
/* This constant, being ORed with the color index tells the library
* to draw in exclusive-or mode (that is, drawing the same second time
@@ -21,7 +21,7 @@
*/
#define XORMODE 0x80000000
-extern __u32 xres, yres;
+extern uint32_t xres, yres;
int open_framebuffer(void);
void close_framebuffer(void);
Index: tslib-1.0/tests/fbutils.c
===================================================================
--- tslib-1.0.orig/tests/fbutils.c 2012-06-13 23:58:21.000000000 +0000
+++ tslib-1.0/tests/fbutils.c 2012-06-13 23:59:55.000000000 +0000
@@ -42,7 +42,7 @@
static int fb_fd=0;
static int bytes_per_pixel;
static unsigned colormap [256];
-__u32 xres, yres;
+uint32_t xres, yres;
static char *defaultfbdevice = "/dev/fb0";
static char *defaultconsoledevice = "/dev/tty";
@@ -136,7 +136,7 @@
memset(fbuffer,0,fix.smem_len);
bytes_per_pixel = (var.bits_per_pixel + 7) / 8;
- line_addr = malloc (sizeof (__u32) * var.yres_virtual);
+ line_addr = malloc (sizeof (uint32_t) * var.yres_virtual);
addr = 0;
for (y = 0; y < var.yres_virtual; y++, addr += fix.line_length)
line_addr [y] = fbuffer + addr;
@@ -288,8 +288,8 @@
unsigned xormode;
union multiptr loc;
- if ((x < 0) || ((__u32)x >= var.xres_virtual) ||
- (y < 0) || ((__u32)y >= var.yres_virtual))
+ if ((x < 0) || ((uint32_t)x >= var.xres_virtual) ||
+ (y < 0) || ((uint32_t)y >= var.yres_virtual))
return;
xormode = colidx & XORMODE;
@@ -360,10 +360,10 @@
/* Clipping and sanity checking */
if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; }
if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; }
- if (x1 < 0) x1 = 0; if ((__u32)x1 >= xres) x1 = xres - 1;
- if (x2 < 0) x2 = 0; if ((__u32)x2 >= xres) x2 = xres - 1;
- if (y1 < 0) y1 = 0; if ((__u32)y1 >= yres) y1 = yres - 1;
- if (y2 < 0) y2 = 0; if ((__u32)y2 >= yres) y2 = yres - 1;
+ if (x1 < 0) x1 = 0; if ((uint32_t)x1 >= xres) x1 = xres - 1;
+ if (x2 < 0) x2 = 0; if ((uint32_t)x2 >= xres) x2 = xres - 1;
+ if (y1 < 0) y1 = 0; if ((uint32_t)y1 >= yres) y1 = yres - 1;
+ if (y2 < 0) y2 = 0; if ((uint32_t)y2 >= yres) y2 = yres - 1;
if ((x1 > x2) || (y1 > y2))
return;
Reply to: