diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..cacc3c5d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +Makefile +Makefile.in +.deps +.libs +*.lo +*.la +*.o diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index d1e726804..5d533a464 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -1049,7 +1049,6 @@ ProcXineramaIsActive(ClientPtr client) { /* The following hack fools clients into thinking that Xinerama * is disabled even though it is not. */ - extern Bool PanoramiXExtensionDisabledHack; rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack; } #else diff --git a/Xext/xevie.c b/Xext/xevie.c index a468affcc..ccc12371a 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -104,7 +104,7 @@ typedef struct { } xevieKeycQueueRec, *xevieKeycQueuePtr; #define KEYC_QUEUE_SIZE 100 -xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {0, NULL}; +xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}}; static int keycqHead = 0, keycqTail = 0; static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr); @@ -165,7 +165,6 @@ void ResetProc (ExtensionEntry *extEntry) static int ProcQueryVersion (register ClientPtr client) { - REQUEST (xXevieQueryVersionReq); xXevieQueryVersionReply rep; REQUEST_SIZE_MATCH (xXevieQueryVersionReq); @@ -181,7 +180,6 @@ int ProcQueryVersion (register ClientPtr client) static int ProcStart (register ClientPtr client) { - REQUEST (xXevieStartReq); xXevieStartReply rep; REQUEST_SIZE_MATCH (xXevieStartReq); diff --git a/dix/devices.c b/dix/devices.c index ef1bdf354..c7d3494e8 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -66,7 +66,9 @@ SOFTWARE. #include "cursorstr.h" #include "dixstruct.h" #include "site.h" +#ifndef XKB_IN_SERVER #define XKB_IN_SERVER +#endif #ifdef XKB #include #endif diff --git a/dix/dispatch.c b/dix/dispatch.c index c8ee8d610..04e2ba11f 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -115,7 +115,9 @@ int ProcInitialConnection(); #include #endif #ifdef XKB +#ifndef XKB_IN_SERVER #define XKB_IN_SERVER +#endif #include "inputstr.h" #include #endif diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index ddc4d2b04..e7f04df16 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -78,9 +78,6 @@ extern void GlxSetVisualConfigs( ); #endif /* GLXEXT */ -extern void SetVendorRelease(int release); /* in dix/main.c */ -extern void SetVendorString(char *string); /* in dix/main.c */ - /* Global variables available to all Xserver/hw/dmx routines. */ int dmxNumScreens; DMXScreenInfo *dmxScreens; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index 324be10a3..43fa85416 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -129,6 +129,7 @@ typedef enum { /* built-in mode - configure CRTC and clock */ # define M_T_DEFAULT 0x10 /* (VESA) default modes */ # define M_T_USERDEF 0x20 /* One of the modes from the config file */ +# define M_T_EDID 0x40 /* Mode from the EDID info from the monitor */ /* Video mode */ typedef struct _DisplayModeRec { diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 49546ec81..05df28103 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -367,169 +367,6 @@ _GetModuleType(int fd, long offset) return LD_ELFDLOBJECT; } -static int offsetbias = 0; /* offset into archive */ - -/* - * _LoaderFileToMem() loads the contents of a file into memory using - * the most efficient method for a platform. - */ -void * -_LoaderFileToMem(int fd, unsigned long offset, int size, char *label) -{ -#ifdef UseMMAP - unsigned long ret; - -# ifdef MmapPageAlign - unsigned long pagesize; - unsigned long new_size; - unsigned long new_off; - unsigned long new_off_bias; -# endif -# define MMAP_PROT (PROT_READ|PROT_WRITE|PROT_EXEC) - -# ifdef DEBUGMEM - ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)", fd, offset, offsetbias, size, - label); -# endif -# ifdef MmapPageAlign - pagesize = getpagesize(); - new_size = (size + pagesize - 1) / pagesize; - new_size *= pagesize; - new_off = (offset + offsetbias) / pagesize; - new_off *= pagesize; - new_off_bias = (offset + offsetbias) - new_off; - if ((new_off_bias + size) > new_size) - new_size += pagesize; - ret = (unsigned long)mmap(0, new_size, MMAP_PROT, MAP_PRIVATE -# ifdef __amd64__ - | MAP_32BIT -# endif - , fd, new_off); - if (ret == -1) - FatalError("mmap() failed: %s\n", strerror(errno)); - return (void *)(ret + new_off_bias); -# else - ret = (unsigned long)mmap(0, size, MMAP_PROT, MAP_PRIVATE -# ifdef __amd64__ - | MAP_32BIT -# endif - , fd, offset + offsetbias); - if (ret == -1) - FatalError("mmap() failed: %s\n", strerror(errno)); - return (void *)ret; -# endif -#else - char *ptr; - -# ifdef DEBUGMEM - ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)", fd, offset, offsetbias, size, - label); -# endif - - if (size == 0) { -# ifdef DEBUGMEM - ErrorF("=NULL\n", ptr); -# endif - return NULL; - } -# ifndef __UNIXOS2__ - if ((ptr = xf86loadercalloc(size, 1)) == NULL) - FatalError("_LoaderFileToMem() malloc failed\n"); -# else - if ((ptr = os2ldcalloc(size, 1)) == NULL) - FatalError("_LoaderFileToMem() malloc failed\n"); -# endif -# if defined(linux) && defined(__ia64__) - { - unsigned long page_size = getpagesize(); - unsigned long round; - - round = (unsigned long)ptr & (page_size - 1); - mprotect(ptr - round, - (size + round + page_size - 1) & ~(page_size - 1), - PROT_READ | PROT_WRITE | PROT_EXEC); - } -# endif - - if (lseek(fd, offset + offsetbias, SEEK_SET) < 0) - FatalError("\n_LoaderFileToMem() lseek() failed: %s\n", - strerror(errno)); - - if (read(fd, ptr, size) != size) - FatalError("\n_LoaderFileToMem() read() failed: %s\n", - strerror(errno)); - -# if (defined(linux) || defined(__NetBSD__) || defined(__OpenBSD__) \ - || defined(__FreeBSD__)) && defined(__powerpc__) - /* - * Keep the instruction cache in sync with changes in the - * main memory. - */ - { - int i; - - for (i = 0; i < size; i += 16) - ppc_flush_icache(ptr + i); - ppc_flush_icache(ptr + size - 1); - } -# endif - -# ifdef DEBUGMEM - ErrorF("=%lx\n", ptr); -# endif - - return (void *)ptr; -#endif -} - -/* - * _LoaderFreeFileMem() free the memory in which a file was loaded. - */ -void -_LoaderFreeFileMem(void *addr, int size) -{ -#if defined (UseMMAP) && defined (MmapPageAlign) - unsigned long pagesize = getpagesize(); - memType i_addr = (memType) addr; - unsigned long new_size; -#endif -#ifdef DEBUGMEM - ErrorF("_LoaderFreeFileMem(%x,%d)\n", addr, size); -#endif -#ifdef UseMMAP -# if defined (MmapPageAlign) - i_addr /= pagesize; - i_addr *= pagesize; - new_size = (size + pagesize - 1) / pagesize; - new_size *= pagesize; - if (((memType) addr - i_addr + size) > new_size) - new_size += pagesize; - munmap((void *)i_addr, new_size); -# else - munmap((void *)addr, size); -# endif -#else - if (size == 0) - return; - - xf86loaderfree(addr); -#endif - - return; -} - -int -_LoaderFileRead(int fd, unsigned int offset, void *buf, int size) -{ - if (lseek(fd, offset + offsetbias, SEEK_SET) < 0) - FatalError("_LoaderFileRead() lseek() failed: %s\n", strerror(errno)); - - if (read(fd, buf, size) != size) - FatalError("_LoaderFileRead() read() failed: %s\n", strerror(errno)); - - return size; -} - static loaderPtr listHead = (loaderPtr) 0; static loaderPtr diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h index 63e6715fa..193adddda 100644 --- a/hw/xfree86/loader/loader.h +++ b/hw/xfree86/loader/loader.h @@ -235,13 +235,6 @@ int _LoaderAddressToSection(const unsigned long, const char **, int LoaderOpen(const char *, const char *, int, int *, int *, int *, int); int LoaderHandleOpen(int); -/* - * File interface functions - */ -void *_LoaderFileToMem(int fd, unsigned long offset, int size, char *label); -void _LoaderFreeFileMem(void *addr, int size); -int _LoaderFileRead(int fd, unsigned int offset, void *addr, int size); - /* * object to name lookup routines */ diff --git a/include/dix.h b/include/dix.h index 1687f751a..9fc5b07b3 100644 --- a/include/dix.h +++ b/include/dix.h @@ -516,6 +516,12 @@ extern void FreeAllAtoms(void); extern void InitAtoms(void); +/* main.c */ + +extern void SetVendorRelease(int release); + +extern void SetVendorString(char *string); + /* events.c */ extern void SetMaskForEvent( diff --git a/include/globals.h b/include/globals.h index 95e11fe70..d396d19c8 100644 --- a/include/globals.h +++ b/include/globals.h @@ -50,6 +50,7 @@ extern Bool PanoramiXMapped; extern Bool PanoramiXVisibilityNotifySent; extern Bool PanoramiXWindowExposureSent; extern Bool PanoramiXOneExposeRequest; +extern Bool PanoramiXExtensionDisabledHack; #endif #ifdef BIGREQS