ports: xorg port

This commit is contained in:
Matheus
2024-04-20 10:24:33 -03:00
parent ef5ef94679
commit 1e4f50a41e
116 changed files with 2163 additions and 2 deletions
@@ -0,0 +1,70 @@
diff --git ace-of-penguins-clean/lib/Makefile.am ace-of-penguins-workdir/lib/Makefile.am
index 2056424..e93f8bd 100644
--- ace-of-penguins-clean/lib/Makefile.am
+++ ace-of-penguins-workdir/lib/Makefile.am
@@ -6,7 +6,7 @@ noinst_HEADERS = cards.h
CLEANFILES = images.c images.d
INCLUDES = $(X_CFLAGS) @PDA@
-AM_LDFLAGS = $(X_LIBS)
+AM_LDFLAGS = $(X_LIBS) -lpng -lz -lm
BUILD_CC = @BUILD_CC@
AR = @AR@
diff --git ace-of-penguins-clean/lib/make-imglib.c ace-of-penguins-workdir/lib/make-imglib.c
index 84cda12..dde0ffa 100644
--- ace-of-penguins-clean/lib/make-imglib.c
+++ ace-of-penguins-workdir/lib/make-imglib.c
@@ -86,7 +86,7 @@ scan_image_directory ()
png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0);
info_ptr = png_create_info_struct (png_ptr);
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(png_ptr))) {
fclose (f);
continue;
}
diff --git ace-of-penguins-clean/lib/xwin.c ace-of-penguins-workdir/lib/xwin.c
index e4bcca2..724be23 100644
--- ace-of-penguins-clean/lib/xwin.c
+++ ace-of-penguins-workdir/lib/xwin.c
@@ -55,7 +55,7 @@ OptionDesc xwin_options_list[] = {
{ "-visual", OPTION_INTEGER, &visual_id },
{ 0, 0, 0 }
};
-OptionDesc *xwin_options = xwin_options_list;
+//OptionDesc *xwin_options = xwin_options_list;
Display *display=0;
int screen=0;
@@ -89,10 +89,10 @@ int help_background;
/* Motif window hints */
typedef struct
{
- unsigned flags;
- unsigned functions;
- unsigned decorations;
- int inputMode;
+ unsigned long flags;
+ unsigned long functions;
+ unsigned long decorations;
+ long inputMode;
} PropMotifWmHints;
typedef PropMotifWmHints PropMwmHints;
@@ -841,13 +841,13 @@ build_image (image *src)
png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0);
info_ptr = png_create_info_struct (png_ptr);
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(png_ptr))) {
fprintf(stderr, "Invalid PNG image!\n");
return;
}
file_bytes = src->file_data;
- png_set_read_fn (png_ptr, (voidp)&file_bytes, (png_rw_ptr)png_reader);
+ png_set_read_fn (png_ptr, (void*)&file_bytes, (png_rw_ptr)png_reader);
png_read_info (png_ptr, info_ptr);
@@ -0,0 +1,13 @@
diff --git fontconfig-clean/src/fcstat.c fontconfig-workdir/src/fcstat.c
index 4f69eae..03c1b95 100644
--- fontconfig-clean/src/fcstat.c
+++ fontconfig-workdir/src/fcstat.c
@@ -386,7 +386,7 @@ FcFStatFs (int fd, FcStatFS *statb)
# endif
# if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME)
p = buf.f_fstypename;
-# elif defined(__linux__) || defined (__EMSCRIPTEN__)
+# elif defined(__linux__) || defined (__EMSCRIPTEN__) || defined(__astral__)
switch (buf.f_type)
{
case 0x6969: /* nfs */
@@ -0,0 +1,31 @@
diff --git libgpg-error-workdir/src/syscfg/lock-obj-pub.astral.h libgpg-error-workdir/src/syscfg/lock-obj-pub.astral.h
new file mode 100644
index 0000000..0dd6431
--- /dev/null
+++ libgpg-error-workdir/src/syscfg/lock-obj-pub.astral.h
@@ -0,0 +1,25 @@
+## lock-obj-pub.x86_64-pc-linux-gnu.h
+## File created by gen-posix-lock-obj - DO NOT EDIT
+## To be included by mkheader into gpg-error.h
+
+typedef struct
+{
+ long _vers;
+ union {
+ volatile char _priv[40];
+ long _x_align;
+ long *_xp_align;
+ } u;
+} gpgrt_lock_t;
+
+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0}}}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##
+12
View File
@@ -0,0 +1,12 @@
diff --git libxcb-clean/configure.ac libxcb-workdir/configure.ac
index 4198a50..d583696 100644
--- libxcb-clean/configure.ac
+++ libxcb-workdir/configure.ac
@@ -54,6 +54,7 @@ PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.14)
NEEDED="xau >= 0.99.2"
case $host_os in
linux*) ;;
+astral*) ;;
*) NEEDED="$NEEDED pthread-stubs" ;;
esac
PKG_CHECK_MODULES(NEEDED, $NEEDED)
+2 -2
View File
@@ -188,7 +188,7 @@ index 0000000..e5b087a
+
diff --git mlibc-workdir/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp
new file mode 100644
index 0000000..fce0f3b
index 0000000..3d53e6b
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/generic.cpp
@@ -0,0 +1,594 @@
@@ -399,7 +399,7 @@ index 0000000..fce0f3b
+ }
+
+ int sys_rename(const char *path, const char *new_path) {
+ sys_renameat(AT_FDCWD, path, AT_FDCWD, new_path);
+ return sys_renameat(AT_FDCWD, path, AT_FDCWD, new_path);
+ }
+
+ int sys_utimensat(int dirfd, const char *pathname, const struct timespec times[2], int flags) {
+26
View File
@@ -0,0 +1,26 @@
diff --git xclock-clean/Clock.c xclock-workdir/Clock.c
index de6beb6..6d726ef 100644
--- xclock-clean/Clock.c
+++ xclock-workdir/Clock.c
@@ -1292,7 +1292,7 @@ static void
round_time(float _update, struct tm *tm, struct timeval *tv)
{
/* interval in milliseconds */
- unsigned long update = (int) (_update * 1000.0 + 0.5);
+ unsigned long update = roundf(_update * 1000.0 + 0.5);
/* compute milliseconds since midnight */
unsigned long old_secs = time_seconds(tm);
diff --git xclock-clean/configure.ac xclock-workdir/configure.ac
index 7d9847b..e15fecd 100644
--- xclock-clean/configure.ac
+++ xclock-workdir/configure.ac
@@ -41,8 +41,6 @@ XORG_DEFAULT_OPTIONS
AC_CHECK_FUNCS([strlcpy getpid nl_langinfo])
-AM_ICONV
-
dnl Required dependencies
PKG_CHECK_MODULES(XCLOCK, [xaw7 xmu x11 xproto >= 7.0.17])
XCLOCK_LIBS="$XCLOCK_LIBS $LIBICONV"
+38
View File
@@ -0,0 +1,38 @@
diff --git xedit-clean/lisp/mathimp.c xedit-workdir/lisp/mathimp.c
index 0433968..3734efb 100644
--- xedit-clean/lisp/mathimp.c
+++ xedit-workdir/lisp/mathimp.c
@@ -29,6 +29,7 @@
/* $XFree86: xc/programs/xedit/lisp/mathimp.c,v 1.14tsi Exp $ */
+int finite(double);
/*
* Defines
diff --git xedit-clean/lisp/mp/mpi.c xedit-workdir/lisp/mp/mpi.c
index 7fcc30e..6984f09 100644
--- xedit-clean/lisp/mp/mpi.c
+++ xedit-workdir/lisp/mp/mpi.c
@@ -29,6 +29,8 @@
/* $XFree86: xc/programs/xedit/lisp/mp/mpi.c,v 1.12 2002/11/20 07:44:43 paulo Exp $ */
+int finite(double);
+
#include "mp.h"
#if defined(__UNIXOS2__) || defined(__APPLE__)
diff --git xedit-clean/lisp/read.c xedit-workdir/lisp/read.c
index 4103736..8898b1b 100644
--- xedit-clean/lisp/read.c
+++ xedit-workdir/lisp/read.c
@@ -29,6 +29,8 @@
/* $XFree86: xc/programs/xedit/lisp/read.c,v 1.36tsi Exp $ */
+int finite(double);
+
#include <errno.h>
#include "lisp/read.h"
#include "lisp/package.h"
@@ -0,0 +1,179 @@
diff --git xf86-input-keyboard-clean/configure.ac xf86-input-keyboard-workdir/configure.ac
index 0f71ce3..024edd3 100644
--- xf86-input-keyboard-clean/configure.ac
+++ xf86-input-keyboard-workdir/configure.ac
@@ -57,6 +57,11 @@ AC_SUBST(inputdir)
# The keyboard driver code is O/S specific
case $host_os in
+
+ astral*)
+ IS_ASTRAL="yes"
+ ;;
+
linux*)
AC_MSG_ERROR([This is not the keyboard driver you are looking for. Use evdev or libinput.])
;;
@@ -95,6 +100,7 @@ case $host_os in
esac
AC_SUBST([OS_FLAGS])
+AM_CONDITIONAL(ASTRAL, [test "x$IS_ASTRAL" = xyes])
AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
AM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes])
diff --git xf86-input-keyboard-clean/src/Makefile.am xf86-input-keyboard-workdir/src/Makefile.am
index 52f5f4d..7de71b9 100644
--- xf86-input-keyboard-clean/src/Makefile.am
+++ xf86-input-keyboard-workdir/src/Makefile.am
@@ -26,10 +26,15 @@ kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h
kbd_drv_la_LIBADD = $(XORG_LIBS)
kbd_drv_ladir = @inputdir@
+ASTRAL_SRCS = astral_kbd.c astral_KbdMap.c
BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c
HURD_SRCS = hurd_kbd.c at_scancode.c
SOLARIS_SRCS = sun_kbd.c sun_kbd.h sun_kbdMap.c
+if ASTRAL
+kbd_drv_la_SOURCES += $(ASTRAL_SRCS)
+endif
+
if BSD
kbd_drv_la_SOURCES += $(BSD_SRCS)
endif
@@ -42,4 +47,4 @@ if HURD
kbd_drv_la_SOURCES += $(HURD_SRCS)
endif
-EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(SOLARIS_SRCS)
+EXTRA_DIST = $(ASTRAL_SRCS) $(BSD_SRCS) $(HURD_SRCS) $(SOLARIS_SRCS)
diff --git xf86-input-keyboard-workdir/src/astral_KbdMap.c xf86-input-keyboard-workdir/src/astral_KbdMap.c
new file mode 100644
index 0000000..2ca19fd
--- /dev/null
+++ xf86-input-keyboard-workdir/src/astral_KbdMap.c
@@ -0,0 +1,27 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <xorg-server.h>
+#include <X11/X.h>
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include "xf86Xinput.h"
+#include "xf86OSKbd.h"
+#include "atKeynames.h"
+#include "xf86Keymap.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+void getmap(InputInfoPtr info, KeySymsPtr syms, CARD8 *map){
+ syms->map = map;
+ syms->mapWidth = GLYPHS_PER_KEY;
+ syms->minKeyCode = MIN_KEYCODE;
+ syms->maxKeyCode = MAX_KEYCODE;
+}
diff --git xf86-input-keyboard-workdir/src/astral_kbd.c xf86-input-keyboard-workdir/src/astral_kbd.c
new file mode 100644
index 0000000..c902c94
--- /dev/null
+++ xf86-input-keyboard-workdir/src/astral_kbd.c
@@ -0,0 +1,90 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <xorg-server.h>
+#include <X11/X.h>
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include "xf86Xinput.h"
+#include "xf86OSKbd.h"
+#include "atKeynames.h"
+#include "xf86Keymap.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+// astral stuff
+
+#define KBPACKET_FLAGS_RELEASED 1
+#define KBPACKET_FLAGS_LEFTCTRL 2
+#define KBPACKET_FLAGS_CAPSLOCK 4
+#define KBPACKET_FLAGS_LEFTALT 8
+#define KBPACKET_FLAGS_RIGHTALT 16
+#define KBPACKET_FLAGS_LEFTSHIFT 32
+#define KBPACKET_FLAGS_RIGHTCTRL 64
+#define KBPACKET_FLAGS_RIGHTSHIFT 128
+
+typedef struct {
+ char ascii;
+ uintmax_t keycode;
+ int flags;
+} kbpacket_t;
+
+
+// interface
+
+static int nop(){
+ return Success;
+}
+
+static int getleds(InputInfoPtr pInfo){return 0;}
+
+static int init(InputInfoPtr, int){return Success;}
+
+static void kbdread(InputInfoPtr info){
+ KbdDevPtr kbd = (KbdDevPtr) info->private;
+ kbpacket_t packet;
+
+ while(read(info->fd, &packet, sizeof(kbpacket_t)))
+ kbd->PostEvent(info, packet.keycode, packet.flags & KBPACKET_FLAGS_RELEASED ? FALSE : TRUE);
+
+}
+
+static Bool openkeyboard(InputInfoPtr info){
+ char *kbdPath = xf86SetStrOption(info->options, "Device", "/dev/keyboard");
+ info->fd = open("/dev/keyboard", O_NONBLOCK | O_RDONLY);
+ if(info->fd == -1)
+ FatalError("Failed to open keyboard (%s)\n",strerror(errno));
+
+ info->read_input = kbdread;
+
+ return TRUE;
+}
+
+
+void getmap(InputInfoPtr info, KeySymsPtr syms, CARD8 *map);
+
+Bool xf86OSKbdPreInit(InputInfoPtr info){
+
+ KbdDevPtr kbd = info->private;
+
+ kbd->KbdInit = init;
+ kbd->KbdOn = nop;
+ kbd->KbdOff = nop;
+ kbd->Bell = nop;
+ kbd->SetLeds = nop;
+ kbd->GetLeds = getleds;
+ kbd->KbdGetMapping = getmap;
+ kbd->RemapScanCode = 0;
+ kbd->OpenKeyboard = openkeyboard;
+
+ kbd->private = NULL;
+
+ return TRUE;
+}
@@ -0,0 +1,146 @@
diff --git xf86-input-mouse-clean/configure.ac xf86-input-mouse-workdir/configure.ac
index 6c453cd..e27bdcb 100644
--- xf86-input-mouse-clean/configure.ac
+++ xf86-input-mouse-workdir/configure.ac
@@ -84,6 +84,9 @@ case $host_os in
gnu*)
OS_MOUSE_NAME=hurd
;;
+ astral*)
+ OS_MOUSE_NAME=astral
+ ;;
esac
AC_SUBST([OS_MOUSE_NAME])
diff --git xf86-input-mouse-workdir/src/astral_mouse.c xf86-input-mouse-workdir/src/astral_mouse.c
new file mode 100644
index 0000000..49644ac
--- /dev/null
+++ xf86-input-mouse-workdir/src/astral_mouse.c
@@ -0,0 +1,126 @@
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <xorg-server.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "mipointer.h"
+
+#include "xf86.h"
+#include "xf86Xinput.h"
+#include "mouse.h"
+#include "xf86_OSlib.h"
+#include "xisb.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdbool.h>
+
+#include <sys/stat.h>
+
+
+#define MOUSE_FLAG_RB 1
+#define MOUSE_FLAG_MB 2
+#define MOUSE_FLAG_LB 4
+#define MOUSE_FLAG_B4 8
+#define MOUSE_FLAG_B5 16
+
+
+typedef struct {
+ int flags;
+ int x,y,z;
+} mousepacket_t;
+
+static void astralReadInput(InputInfoPtr pInfo){
+ MouseDevPtr mouse = pInfo->private;
+ mousepacket_t packet;
+
+ while(read(pInfo->fd, &packet, sizeof(packet)) == sizeof(packet)){
+ int b = mouse->lastButtons;
+ b &= ~0x7;
+ b |= (packet.flags & MOUSE_FLAG_RB) ? 1 : 0;
+ b |= (packet.flags & MOUSE_FLAG_MB) ? 2 : 0;
+ b |= (packet.flags & MOUSE_FLAG_LB) ? 4 : 0;
+
+ mouse->PostEvent(pInfo, b, packet.x, -packet.y, packet.z, 0);
+ }
+
+}
+
+static Bool astralPreInit(InputInfoPtr pInfo, const char* proto, int flag){
+
+ MouseDevPtr mouse;
+
+ mouse = pInfo->private;
+
+ mouse->protocol = proto;
+
+ xf86ProcessCommonOptions(pInfo, pInfo->options);
+
+ pInfo->fd = xf86OpenSerial(pInfo->options);
+ if(pInfo->fd == -1){
+ xf86Msg(X_ERROR, "%s: cannot open mouse device!\n", pInfo->name);
+ return FALSE;
+ }
+
+ mouse->CommonOptions(pInfo);
+ pInfo->read_input = astralReadInput;
+ return true;
+
+
+}
+
+#define DEVPATH "/dev/mouse"
+
+static const char* getdevice(InputInfoPtr pInfo, const char* proto, int flag){
+
+ struct stat st;
+
+ if(stat(DEVPATH, &st) == -1)
+ return NULL;
+
+ pInfo->options = xf86AddNewOption(pInfo->options, "Device", DEVPATH);
+
+ return DEVPATH;
+
+}
+
+static int interfacesupport(){
+ return MSE_PS2;
+}
+
+static const char* names[] = {
+ "AstralMouseDev", NULL
+};
+
+static const char** protonames(){
+ return names;
+}
+
+static const char* defaultproto(){
+ return "AstralMouseDev";
+}
+
+static Bool isdefault(const char *protocol){
+ return strcmp(protocol, defaultproto()) == 0;
+}
+
+OSMouseInfoPtr OSMouseInit(int flag){
+ OSMouseInfoPtr p;
+
+ p = calloc(sizeof(OSMouseInfoRec), 1);
+
+ if (!p)
+ return NULL;
+ p->SupportedInterfaces = interfacesupport;
+ p->BuiltinNames = protonames;
+ p->FindDevice = getdevice;
+ p->DefaultProtocol = defaultproto;
+ p->CheckProtocol = isdefault;
+ p->PreInit = astralPreInit;
+ return p;
+}
+
@@ -0,0 +1,85 @@
diff --git xf86-video-fbdev-clean/configure.ac xf86-video-fbdev-workdir/configure.ac
index 27778cd..4e53999 100644
--- xf86-video-fbdev-clean/configure.ac
+++ xf86-video-fbdev-workdir/configure.ac
@@ -55,11 +55,6 @@ AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess],
[Enable use of libpciaccess (default: disabled)]),
[PCIACCESS=$enableval], [PCIACCESS=no])
-# Store the list of server defined optional extensions in REQUIRED_MODULES
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
-XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
-XORG_DRIVER_CHECK_EXT(XV, videoproto)
-
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
@@ -86,6 +81,8 @@ AC_SUBST([moduledir])
DRIVER_NAME=fbdev
AC_SUBST([DRIVER_NAME])
+AC_SUBST([SYSROOT])
+
AC_CONFIG_FILES([
Makefile
src/Makefile
diff --git xf86-video-fbdev-clean/src/Makefile.am xf86-video-fbdev-workdir/src/Makefile.am
index fbe420e..1ef5f49 100644
--- xf86-video-fbdev-clean/src/Makefile.am
+++ xf86-video-fbdev-workdir/src/Makefile.am
@@ -25,7 +25,7 @@
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
AM_CFLAGS = @XORG_CFLAGS@
fbdev_drv_la_LTLIBRARIES = fbdev_drv.la
-fbdev_drv_la_LDFLAGS = -module -avoid-version
+fbdev_drv_la_LDFLAGS = -module -avoid-version -R@moduledir@ -L@SYSROOT@@moduledir@ -lfbdevhw -lshadow
fbdev_drv_ladir = @moduledir@/drivers
fbdev_drv_la_SOURCES = \
diff --git xf86-video-fbdev-clean/src/fbdev.c xf86-video-fbdev-workdir/src/fbdev.c
index f25ef72..cc92cb1 100644
--- xf86-video-fbdev-clean/src/fbdev.c
+++ xf86-video-fbdev-workdir/src/fbdev.c
@@ -339,7 +339,7 @@ FBDevProbe(DriverPtr drv, int flags)
dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
if (devSections[i]->busID) {
-#ifndef XSERVER_LIBPCIACCESS
+#if 0
if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device,
&func)) {
if (!xf86CheckPciSlot(bus,device,func))
@@ -358,7 +358,7 @@ FBDevProbe(DriverPtr drv, int flags)
if (fbdevHWProbe(NULL,dev,NULL)) {
pScrn = NULL;
if (isPci) {
-#ifndef XSERVER_LIBPCIACCESS
+#if 0
/* XXX what about when there's no busID set? */
int entity;
@@ -444,6 +444,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
fPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
#ifndef XSERVER_LIBPCIACCESS
+#if 0
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
/* XXX Is this right? Can probably remove RAC_FB */
pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
@@ -454,6 +455,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
"xf86RegisterResources() found resource conflicts\n");
return FALSE;
}
+#endif
#else
if (fPtr->pEnt->location.type == BUS_PCI)
pci_dev = fPtr->pEnt->location.id.pci;
@@ -1010,7 +1012,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
fPtr->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = FBDevCloseScreen;
-#if XV
+#ifdef XV
{
XF86VideoAdaptorPtr *ptr;
@@ -0,0 +1,264 @@
diff --git xorg-server-clean/hw/xfree86/common/xf86Bus.c xorg-server-workdir/hw/xfree86/common/xf86Bus.c
index fd144db..b232e27 100644
--- xorg-server-clean/hw/xfree86/common/xf86Bus.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Bus.c
@@ -556,6 +556,7 @@ xf86GetDevFromEntity(int entityIndex, int instance)
void
xf86PostProbe(void)
{
+#if 0
if (fbSlotClaimed && (
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
sbusSlotClaimed ||
@@ -571,6 +572,7 @@ xf86PostProbe(void)
))
FatalError("Cannot run in framebuffer mode. Please specify busIDs "
" for all framebuffer devices\n");
+#endif
}
Bool
diff --git xorg-server-clean/hw/xfree86/common/xf86Config.c xorg-server-workdir/hw/xfree86/common/xf86Config.c
index 5d814c1..14ebfe6 100644
--- xorg-server-clean/hw/xfree86/common/xf86Config.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Config.c
@@ -49,6 +49,8 @@
#include <sys/types.h>
#include <grp.h>
+#include <sys/stat.h>
+
#include "xf86.h"
#include "xf86Modes.h"
#include "xf86Parser.h"
diff --git xorg-server-clean/hw/xfree86/common/xf86Configure.c xorg-server-workdir/hw/xfree86/common/xf86Configure.c
index 4347f6d..dc929f9 100644
--- xorg-server-clean/hw/xfree86/common/xf86Configure.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Configure.c
@@ -42,6 +42,8 @@
#include "misc.h"
#include "loaderProcs.h"
+#include <errno.h>
+
typedef struct _DevToConfig {
GDevRec GDev;
struct pci_device *pVideo;
diff --git xorg-server-clean/hw/xfree86/common/xf86Events.c xorg-server-workdir/hw/xfree86/common/xf86Events.c
index 395bbc7..4bf86cb 100644
--- xorg-server-clean/hw/xfree86/common/xf86Events.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Events.c
@@ -53,6 +53,8 @@
#include <xorg-config.h>
#endif
+#include <errno.h>
+
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
diff --git xorg-server-clean/hw/xfree86/common/xf86Helper.c xorg-server-workdir/hw/xfree86/common/xf86Helper.c
index 0389945..286f271 100644
--- xorg-server-clean/hw/xfree86/common/xf86Helper.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Helper.c
@@ -34,6 +34,8 @@
* different drivers.
*/
+#include <sys/stat.h>
+
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
diff --git xorg-server-clean/hw/xfree86/common/xf86Init.c xorg-server-workdir/hw/xfree86/common/xf86Init.c
index 5695e71..c9230aa 100644
--- xorg-server-clean/hw/xfree86/common/xf86Init.c
+++ xorg-server-workdir/hw/xfree86/common/xf86Init.c
@@ -34,6 +34,7 @@
#include <xorg-config.h>
#endif
+#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
diff --git xorg-server-clean/hw/xfree86/fbdevhw/fbdevhw.c xorg-server-workdir/hw/xfree86/fbdevhw/fbdevhw.c
index 3d8b92e..31a0430 100644
--- xorg-server-clean/hw/xfree86/fbdevhw/fbdevhw.c
+++ xorg-server-workdir/hw/xfree86/fbdevhw/fbdevhw.c
@@ -9,13 +9,10 @@
#include "xf86Modes.h"
#include "xf86_OSproc.h"
-/* pci stuff */
-#include "xf86Pci.h"
-
#include "xf86cmap.h"
#include "fbdevhw.h"
-#include "fbpriv.h"
+#include <linux/fb.h>
#include "globals.h"
#include <X11/extensions/dpmsconst.h>
@@ -259,6 +256,7 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
/**
* Try to find the framebuffer device for a given PCI device
*/
+#if 0
static int
fbdev_open_pci(struct pci_device *pPci, char **namep)
{
@@ -303,6 +301,7 @@ fbdev_open_pci(struct pci_device *pPci, char **namep)
xf86DrvMsg(-1, X_ERROR, "Unable to find a valid framebuffer device\n");
return -1;
}
+#endif
static int
fbdev_open(int scrnIndex, const char *dev, char **namep)
@@ -328,7 +327,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
xf86DrvMsg(scrnIndex, X_ERROR, "open %s: %s\n", dev, strerror(errno));
return -1;
}
-
+#if 0
/* only touch non-PCI devices on this path */
{
char buf[PATH_MAX] = {0};
@@ -344,7 +343,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
}
free(sysfs_path);
}
-
+#endif
if (namep) {
if (-1 == ioctl(fd, FBIOGET_FSCREENINFO, (void *) (&fix))) {
*namep = NULL;
@@ -363,14 +362,10 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
/* -------------------------------------------------------------------- */
Bool
-fbdevHWProbe(struct pci_device *pPci, char *device, char **namep)
+fbdevHWProbe(void* pPci, char *device, char **namep)
{
- int fd;
-
- if (pPci)
- fd = fbdev_open_pci(pPci, namep);
- else
- fd = fbdev_open(-1, device, namep);
+
+ int fd = fbdev_open(-1, device, namep);
if (-1 == fd)
return FALSE;
@@ -379,7 +374,7 @@ fbdevHWProbe(struct pci_device *pPci, char *device, char **namep)
}
Bool
-fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device)
+fbdevHWInit(ScrnInfoPtr pScrn, void *pPci, char *device)
{
fbdevHWPtr fPtr;
@@ -387,10 +382,9 @@ fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device)
fPtr = FBDEVHWPTR(pScrn);
/* open device */
- if (pPci)
- fPtr->fd = fbdev_open_pci(pPci, NULL);
- else
- fPtr->fd = fbdev_open(pScrn->scrnIndex, device, NULL);
+
+ fPtr->fd = fbdev_open(pScrn->scrnIndex, device, NULL);
+
if (-1 == fPtr->fd) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to open framebuffer device, consult warnings"
diff --git xorg-server-clean/hw/xfree86/fbdevhw/fbdevhw.h xorg-server-workdir/hw/xfree86/fbdevhw/fbdevhw.h
index 4984ccf..bb3e2f8 100644
--- xorg-server-clean/hw/xfree86/fbdevhw/fbdevhw.h
+++ xorg-server-workdir/hw/xfree86/fbdevhw/fbdevhw.h
@@ -16,9 +16,9 @@ extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn);
extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn);
-extern _X_EXPORT Bool fbdevHWProbe(struct pci_device *pPci, char *device,
+extern _X_EXPORT Bool fbdevHWProbe(void *pPci, char *device,
char **namep);
-extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci,
+extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, void *pPci,
char *device);
extern _X_EXPORT char *fbdevHWGetName(ScrnInfoPtr pScrn);
diff --git xorg-server-clean/hw/xfree86/os-support/shared/posix_tty.c xorg-server-workdir/hw/xfree86/os-support/shared/posix_tty.c
index 0cb9788..d6df170 100644
--- xorg-server-clean/hw/xfree86/os-support/shared/posix_tty.c
+++ xorg-server-workdir/hw/xfree86/os-support/shared/posix_tty.c
@@ -56,6 +56,8 @@
#include <xorg-config.h>
#endif
+#include <termios.h>
+#include <errno.h>
#include <X11/X.h>
#include <xserver_poll.h>
#include "xf86.h"
diff --git xorg-server-clean/hw/xfree86/os-support/shared/sigio.c xorg-server-workdir/hw/xfree86/os-support/shared/sigio.c
index ad8af60..88eb52f 100644
--- xorg-server-clean/hw/xfree86/os-support/shared/sigio.c
+++ xorg-server-workdir/hw/xfree86/os-support/shared/sigio.c
@@ -56,6 +56,8 @@
#include <xorg-config.h>
#endif
+#include <sys/stat.h>
+#include <errno.h>
#include <X11/X.h>
#include <xserver_poll.h>
#include "xf86.h"
diff --git xorg-server-clean/include/os.h xorg-server-workdir/include/os.h
index bb3348b..aac6cce 100644
--- xorg-server-clean/include/os.h
+++ xorg-server-workdir/include/os.h
@@ -51,6 +51,9 @@ SOFTWARE.
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
+#ifdef __astral__
+#include <strings.h>
+#endif
#ifdef MONOTONIC_CLOCK
#include <time.h>
#endif
diff --git xorg-server-clean/os/access.c xorg-server-workdir/os/access.c
index b170304..53b90c5 100644
--- xorg-server-clean/os/access.c
+++ xorg-server-workdir/os/access.c
@@ -116,7 +116,7 @@ SOFTWARE.
#endif
#endif
-#if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__)
+#if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__) || defined(__astral__)
#include <sys/utsname.h>
#endif
#if defined(SYSV) && defined(__i386__)
diff --git xorg-server-clean/os/ospoll.c xorg-server-workdir/os/ospoll.c
index c68aabc..e74fdbe 100644
--- xorg-server-clean/os/ospoll.c
+++ xorg-server-workdir/os/ospoll.c
@@ -45,12 +45,6 @@
#define HAVE_OSPOLL 1
#endif
-#if !HAVE_OSPOLL && defined(HAVE_EPOLL_CREATE1)
-#include <sys/epoll.h>
-#define EPOLL 1
-#define HAVE_OSPOLL 1
-#endif
-
#if !HAVE_OSPOLL
#include "xserver_poll.h"
#define POLL 1
@@ -0,0 +1,26 @@
diff --git xorgproto-clean/include/X11/Xfuncs.h xorgproto-workdir/include/X11/Xfuncs.h
index b23c283..82c856c 100644
--- xorgproto-clean/include/X11/Xfuncs.h
+++ xorgproto-workdir/include/X11/Xfuncs.h
@@ -44,7 +44,7 @@ void bcopy();
# define bcmp(b1,b2,len) memcmp(b1, b2, len)
# else
# include <string.h>
-# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
+# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__astral__)
# include <strings.h>
# endif
# define _XFUNCS_H_INCLUDED_STRING_H
diff --git xorgproto-clean/include/X11/Xos.h xorgproto-workdir/include/X11/Xos.h
index 28dfc67..f46490a 100644
--- xorgproto-clean/include/X11/Xos.h
+++ xorgproto-workdir/include/X11/Xos.h
@@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group.
*/
# include <string.h>
-# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
+# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__astral__)
# include <strings.h>
# else
# ifndef index