Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.897 diff -u -2 -0 -r1.897 ChangeLog --- xc/ChangeLog 23 Apr 2005 22:55:40 -0000 1.897 +++ xc/ChangeLog 24 Apr 2005 00:58:20 -0000 @@ -1,21 +1,36 @@ 2005-04-23 Roland Mainz + * xc/config/cf/X11.tmpl + * xc/programs/Xserver/Xext/Imakefile + * xc/programs/Xserver/dix/Imakefile + * xc/programs/Xserver/dix/main.c + * xc/programs/Xserver/dix/xpstubs.c + * xc/programs/Xserver/mi/miinitext.c + * xc/programs/Xserver/os/utils.c + bugzilla #2792 (https://bugs.freedesktop.org/show_bug.cgi?id=2792) + attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx) + bug 2792 part II: Make Xprint headers in dix/, mi/, os/ and Xext/ + conditional on whether the Xprint extension is build or not. + Patch by Egbert Eich and Roland Mainz + . + +2005-04-23 Roland Mainz * xc/programs/Xserver/dix/main.c bugzilla #3118 (https://bugs.freedesktop.org/show_bug.cgi?id=3118) attachment #2525 (https://bugs.freedesktop.org/attachment.cgi?id=2525) Get Xprint server working again which was broken by the 05/04/20 05:49:46 commit commit (the CPP symbol |XPRINT| is not universally available when building the Xserver and should be used with care). 2005-04-23 Roland Mainz * xc/config/cf/linux.cf * xc/config/cf/sun.cf bugzilla #3023 (https://bugs.freedesktop.org/show_bug.cgi?id=3023) attachment #2523 (https://bugs.freedesktop.org/attachment.cgi?id=2523) Make the Xserver and libraries (X11, Xt, Xaw etc.) and client applications largefile-aware by default on Linux and Solaris (*BSD platforms and IRIX are aready largefile-aware by default, only the status of AIX+HP/UX is currently unknown). The change does not affect Xserver modules loaded via the ELF loader which would either require an ABI change or a port of the whole lf64(5) API (both steps may not be required as the ELF loader may go away in favour of the DL Index: xc/config/cf/X11.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/X11.tmpl,v retrieving revision 1.45 diff -u -2 -0 -r1.45 X11.tmpl --- xc/config/cf/X11.tmpl 22 Apr 2005 20:49:49 -0000 1.45 +++ xc/config/cf/X11.tmpl 24 Apr 2005 00:58:25 -0000 @@ -968,43 +968,43 @@ #ifndef XInputDefines #if BuildXInputExt #define XInputDefines -DXINPUT #else #define XInputDefines /**/ #endif #endif #ifndef XineramaDefines #if BuildXinerama #define XineramaDefines -DPANORAMIX #else #define XineramaDefines /**/ #endif #endif #ifndef PrintOnlyServer #define PrintOnlyServer YES #endif #ifndef XprintDefines #if BuildXprint #if PrintOnlyServer -#define XprintDefines -DPIXPRIV -#else #define XprintDefines -DXPRINT -DPIXPRIV +#else +#define XprintDefines -DXPRINT -DLOADABLEPRINTDDX -DPIXPRIV #endif #else #define XprintDefines /**/ #endif #endif #ifndef XkbDefines #if BuildXKB #define XkbDefines -DXKB #else #define XkbDefines /**/ #endif #endif #ifndef XkbClientDefines #if UseXKBInClients #define XkbClientDefines -DXKB #else #define XkbClientDefines /**/ #endif #endif #ifndef XkbServerDefines Index: xc/programs/Xserver/Xext/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xext/Imakefile,v retrieving revision 1.8 diff -u -2 -0 -r1.8 Imakefile --- xc/programs/Xserver/Xext/Imakefile 23 Nov 2004 17:29:47 -0000 1.8 +++ xc/programs/Xserver/Xext/Imakefile 24 Apr 2005 00:58:31 -0000 @@ -102,57 +102,62 @@ DMXINCLUDES = -I../hw/dmx #endif #if BuildDPMS DPMSSRCS = dpms.c DPMSOBJS = dpms.o #endif #if BuildFontCache FONTCACHESRCS = fontcache.c FONTCACHEOBJS = fontcache.o #if 0 FONTCACHEINCLUDES = -I$(XF86SRC)/os-support #endif #endif #if BuildXevie XEVIESRCS = xevie.c XEVIEOBJS = xevie.o #endif +#if BuildXprint + XPRINTSRCS = xprint.c + XPRINTOBJS = xprint.o +#endif + SRCS = shape.c $(SHMSRCS) $(MULTIBUFSRC) \ mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ - $(APPGROUPSRCS) xprint.c $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ + $(APPGROUPSRCS) $(XPRINTSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ $(XEVIESRCS) \ $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS) OBJS = shape.o $(SHMOBJS) $(MULTIBUFOBJ) \ mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ - $(APPGROUPOBJS) xprint.o $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ + $(APPGROUPOBJS) $(XPRINTOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ $(XEVIEOBJS) \ $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS) - SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) xprint.o \ + SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) $(XPRINTOBJS) \ shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ $(XEVIEOBJS) \ $(XF86BIGFOBJS) #if (defined(XFree86Version) || defined(XorgVersion)) /* XXX Check if this can be eliminated */ XF86INCLUDES = -I$(XF86COMSRC) #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ $(PNRXINCLUDES) $(XF86INCLUDES) -I$(FONTINCSRC) \ $(FONTCACHEINCLUDES) $(DMXINCLUDES) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(EXT_DEFINES) $(XVMCSHM_DEFINES) NormalLibraryObjectRule() /* * A hack to work around an optimization problem with gcc 2.95.2 */ Index: xc/programs/Xserver/dix/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/Imakefile,v retrieving revision 1.5 diff -u -2 -0 -r1.5 Imakefile --- xc/programs/Xserver/dix/Imakefile 23 Mar 2005 19:58:45 -0000 1.5 +++ xc/programs/Xserver/dix/Imakefile 24 Apr 2005 00:58:31 -0000 @@ -1,30 +1,30 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.17 2003/04/15 18:30:43 alanh Exp $ #include -#if PrintOnlyServer +#if !BuildXprint || PrintOnlyServer XPSRC = xpstubs.c XPOBJ = xpstubs.o #endif #if !HasFfs FFS_SRC = ffs.c FFS_OBJ = ffs.o #endif SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \ extension.c gc.c globals.c glyphcurs.c grabs.c \ main.c property.c resource.c swaprep.c swapreq.c \ tables.c window.c initatoms.c dixfonts.c privates.c pixmap.c $(FFS_SRC) OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ extension.o gc.o globals.o glyphcurs.o grabs.o \ main.o property.o resource.o swaprep.o swapreq.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx -I../Xprint @@ -77,25 +77,25 @@ #endif #endif SITE_DEFINES = $(SITE_FONT_PATH) $(SITE_RGB_DB) $(SITE_DISPLAY_CLASS) VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_RELEASE) $(QUARTZ_DEFINES) NormalLibraryObjectRule() NormalLibraryTarget(dix,$(OBJS)) LintLibraryTarget(dix,$(SRCS) $(XPSRC)) NormalLintTarget($(SRCS) $(XPSRC)) SpecialCObjectRule(globals,$(ICONFIGFILES),$(SITE_DEFINES)) SpecialCObjectRule(tables,$(ICONFIGFILES),$(K5DEFS)) SpecialCObjectRule(dispatch,$(ICONFIGFILES),$(K5DEFS)) SpecialCObjectRule(main,$(ICONFIGFILES),$(VENDOR_DEFINES)) SpecialCObjectRule(pixmap,$(ICONFIGFILES),$(_NOOP_)) SpecialCObjectRule(privates,$(ICONFIGFILES),$(_NOOP_)) SpecialCObjectRule(window,$(ICONFIGFILES),$(QUARTZ_DEFINES)) -#if PrintOnlyServer +#if !BuildXprint || PrintOnlyServer NormalLibraryTarget(xpstubs,$(XPOBJ)) #endif DependTarget() Index: xc/programs/Xserver/dix/main.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v retrieving revision 1.9 diff -u -2 -0 -r1.9 main.c --- xc/programs/Xserver/dix/main.c 23 Apr 2005 22:55:40 -0000 1.9 +++ xc/programs/Xserver/dix/main.c 24 Apr 2005 00:58:31 -0000 @@ -83,41 +83,43 @@ #include #include /* for unistd.h */ #include #include "scrnintstr.h" #include "misc.h" #include "os.h" #include "windowstr.h" #include "resource.h" #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" #include "colormap.h" #include "colormapst.h" #include "cursorstr.h" #include "font.h" #include "opaque.h" #include "servermd.h" #include "site.h" #include "dixfont.h" #include "extnsionst.h" +#ifdef XPRINT #include "DiPrint.h" +#endif #ifdef PANORAMIX #include "panoramiXsrv.h" #else #include "dixevents.h" /* InitEvents() */ #include "dispatch.h" /* InitProcVectors() */ #endif #ifdef DPMSExtension #define DPMS_SERVER #include #include "dpmsproc.h" #endif extern int InitClientPrivates(ClientPtr client); extern void Dispatch(void); char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; @@ -232,41 +234,43 @@ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 3 /* 64 bits per scanline pad unit */ }; #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif int main(int argc, char *argv[], char *envp[]) { int i, j, k, error; char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; display = "0"; InitGlobals(); +#ifdef XPRINT PrinterInitGlobals(); +#endif /* Quartz support on Mac OS X requires that the Cocoa event loop be in * the main thread. This allows the X server main to be called again * from another thread. */ #if defined(__DARWIN__) && defined(DARWIN_WITH_QUARTZ) DarwinHandleGUI(argc, argv, envp); #endif /* Notice if we're restarted. Probably this is because we jumped through * an uninitialized pointer */ if (restart) FatalError("server restarted. Jumped through uninitialized pointer?\n"); else restart = 1; CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); #ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS @@ -344,41 +348,43 @@ PixmapWidthPaddingInfo[1].padPixelsLog2 = answer[j][k]; j = indexForBitsPerPixel[8]; /* bits per byte */ PixmapWidthPaddingInfo[1].padBytesLog2 = answer[j][k]; PixmapWidthPaddingInfo[1].bitsPerPixel = 1; InitAtoms(); InitEvents(); InitGlyphCaching(); ResetClientPrivates(); ResetScreenPrivates(); ResetWindowPrivates(); ResetGCPrivates(); #ifdef PIXPRIV ResetPixmapPrivates(); #endif ResetColormapPrivates(); ResetFontPrivateIndex(); InitCallbackManager(); InitVisualWrap(); InitOutput(&screenInfo, argc, argv); +#ifdef XPRINT PrinterInitOutput(&screenInfo, argc, argv); +#endif if (screenInfo.numScreens < 1) FatalError("no screens found"); if (screenInfo.numVideoScreens < 0) screenInfo.numVideoScreens = screenInfo.numScreens; InitExtensions(argc, argv); if (!InitClientPrivates(serverClient)) FatalError("failed to allocate serverClient devprivates"); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; if (!CreateScratchPixmapsForScreen(i)) FatalError("failed to create scratch pixmaps"); if (pScreen->CreateScreenResources && !(*pScreen->CreateScreenResources)(pScreen)) FatalError("failed to create screen resources"); if (!CreateGCperDepth(i)) FatalError("failed to create scratch GCs"); if (!CreateDefaultStipple(i)) FatalError("failed to create default stipple"); Index: xc/programs/Xserver/dix/xpstubs.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/xpstubs.c,v retrieving revision 1.3 diff -u -2 -0 -r1.3 xpstubs.c --- xc/programs/Xserver/dix/xpstubs.c 23 Mar 2005 19:58:45 -0000 1.3 +++ xc/programs/Xserver/dix/xpstubs.c 24 Apr 2005 00:58:31 -0000 @@ -12,59 +12,62 @@ in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* $Xorg: xpstubs.c,v 1.5 2001/03/08 17:52:08 pookie Exp $ */ #include "misc.h" #include "font.h" +#ifdef XPRINT #include "DiPrint.h" +#endif Bool XpClientIsBitmapClient( ClientPtr client) { return TRUE; } Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe) { return FALSE; } +#ifdef XPRINT int PrinterOptions( int argc, char **argv, int i) { return i; } void PrinterInitOutput( ScreenInfo *pScreenInfo, int argc, char **argv) { } void PrinterUseMsg(void) { } void PrinterInitGlobals(void) { } - +#endif /* XPRINT */ Index: xc/programs/Xserver/mi/miinitext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v retrieving revision 1.18 diff -u -2 -0 -r1.18 miinitext.c --- xc/programs/Xserver/mi/miinitext.c 20 Apr 2005 14:16:37 -0000 1.18 +++ xc/programs/Xserver/mi/miinitext.c 24 Apr 2005 00:58:32 -0000 @@ -67,40 +67,44 @@ #undef MITSHM /* this is incompatible to the vector-based Xprint DDX */ #undef XKB #undef PANORAMIX #undef RES #undef XIE #undef XINPUT #undef XV #undef SCREENSAVER #undef XIDLE #undef XRECORD #undef XF86VIDMODE #undef XF86MISC #undef XFreeXDGA #undef XF86DRI #undef DPMSExtension #undef DPSEXT #undef FONTCACHE #undef DAMAGE #undef XFIXES #undef XEVIE +#else +#ifndef LOADABLEPRINTDDX +#undef XPRINT +#endif /* LOADABLEPRINTDDX */ #endif /* PRINT_ONLY_SERVER */ extern Bool noTestExtensions; #ifdef BEZIER extern Bool noBezierExtension; #endif #ifdef BIGREQS extern Bool noBigReqExtension; #endif #ifdef COMPOSITE extern Bool noCompositeExtension; #endif #ifdef DAMAGE extern Bool noDamageExtension; #endif #ifdef DBE extern Bool noDbeExtension; #endif Index: xc/programs/Xserver/os/utils.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v retrieving revision 1.13 diff -u -2 -0 -r1.13 utils.c --- xc/programs/Xserver/os/utils.c 20 Apr 2005 12:25:47 -0000 1.13 +++ xc/programs/Xserver/os/utils.c 24 Apr 2005 00:58:34 -0000 @@ -106,41 +106,43 @@ #endif #include "opaque.h" #ifdef SMART_SCHEDULE #include "dixstruct.h" #endif #ifdef XKB #include #endif #ifdef XCSECURITY #define _SECURITY_SERVER #include #endif #ifdef RENDER #include "picture.h" #endif +#ifdef XPRINT #include "DiPrint.h" +#endif Bool noTestExtensions; #ifdef BEZIER Bool noBezierExtension = FALSE; #endif #ifdef BIGREQS Bool noBigReqExtension = FALSE; #endif #ifdef COMPOSITE /* COMPOSITE is disabled by default for now until the * interface is stable */ Bool noCompositeExtension = TRUE; #endif #ifdef DAMAGE Bool noDamageExtension = FALSE; #endif #ifdef DBE Bool noDbeExtension = FALSE; #endif #ifdef DPSEXT @@ -638,41 +640,43 @@ #endif #ifndef NOLOGOHACK ErrorF("-logo enable logo in screen saver\n"); ErrorF("nologo disable logo in screen saver\n"); #endif ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-reset reset after last client exists\n"); ErrorF("-p # screen-saver pattern duration (minutes)\n"); ErrorF("-pn accept failure to listen on all ports\n"); ErrorF("-nopn reject failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); #ifdef RENDER ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); #endif ErrorF("-s # screen-saver timeout (minutes)\n"); #ifdef XCSECURITY ErrorF("-sp file security policy file\n"); #endif +#ifdef XPRINT PrinterUseMsg(); +#endif ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); ErrorF("-terminate terminate at server reset\n"); ErrorF("-to # connection time out\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-x string loads named extension at init time \n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n"); #endif #ifdef SMART_SCHEDULE ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n"); ErrorF("-schedInterval int Set scheduler interval in msec\n"); #endif ErrorF("+extension name Enable extension\n");