6800698 Sun modifications to Xinerama headers cause compiler warnings
authorAlan Coopersmith <Alan.Coopersmith@Sun.COM>
Tue, 03 Feb 2009 19:18:42 -0800
changeset 625 afcef81bda59
parent 624 4c8676eadefc
child 626 b36e763afbee
6800698 Sun modifications to Xinerama headers cause compiler warnings
open-src/common/Makefile.init
open-src/lib/libXext/sun-src/include/X11/extensions/xinerama.h
open-src/proto/xineramaproto/Xsun-extended-proto.patch
--- a/open-src/common/Makefile.init	Fri Jan 30 16:30:27 2009 -0800
+++ b/open-src/common/Makefile.init	Tue Feb 03 19:18:42 2009 -0800
@@ -29,7 +29,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# @(#)Makefile.init	1.6	09/01/14
+# @(#)Makefile.init	1.7	09/02/03
 #
 
 # Use ksh93 for shell commands in Makefiles so that builds are the same
@@ -123,10 +123,11 @@
 DEBUG_FLAGS_gcc			= $(DEBUG_FLAGS_common)
 $(BUILD_DEBUG:yes=) DEBUG_OR_OPT_FLAGS_gcc = $(DEBUG_FLAGS_gcc)
 $(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_OR_OPT_FLAGS_gcc = $(OPT_FLAGS_gcc)
+WARNFLAGS_gcc			= -Wall -Wno-unknown-pragmas
 CFLAGS_gcc			= $(DEBUG_OR_OPT_FLAGS_gcc) \
-					-fno-omit-frame-pointer -Wall
+				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
 CXXFLAGS_gcc			= $(DEBUG_OR_OPT_FLAGS_gcc) \
-					-fno-omit-frame-pointer -Wall
+				  -fno-omit-frame-pointer $(WARNFLAGS_gcc)
 
 ARCH32_FLAGS_sparc_gcc	 	= -mcpu=ultrasparc -m32
 ARCH64_FLAGS_sparc_gcc 		= -mcpu=ultrasparc -m64
--- a/open-src/lib/libXext/sun-src/include/X11/extensions/xinerama.h	Fri Jan 30 16:30:27 2009 -0800
+++ b/open-src/lib/libXext/sun-src/include/X11/extensions/xinerama.h	Tue Feb 03 19:18:42 2009 -0800
@@ -1,4 +1,4 @@
-/* Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
+/* Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
@@ -26,19 +26,25 @@
  * of the copyright holder.
  */ 
 
-/* Xinerama header file */
+/* Header file for Sun-created Xinerama APIs in libXext & libdga
+   Mostly deprecated in favor of X.Org standard libXinerama API. */
 
 #ifndef _XINERAMA_H_
 #define _XINERAMA_H_
 
-#define MAXFRAMEBUFFERS       16
-#define XINERAMA_PLACE_TOP    1
-#define XINERAMA_PLACE_BOTTOM 2
-#define XINERAMA_PLACE_RIGHT  4
-#define XINERAMA_PLACE_LEFT   8
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/panoramiXext.h>
+
+#define MAXFRAMEBUFFERS       MAXSCREEN
 
+/* in libXext.so */
+_X_DEPRECATED
 Bool XineramaGetState(Display*, int);
+_X_DEPRECATED
 Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
 Status XineramaGetCenterHint(Display*, int, int*, int*);
 
+/* in libdga.so */
+Bool XDgaGetXineramaInfo(Display *, int, XID, XineramaInfo *);
+
 #endif /* _XINERAMA_H_ */
--- a/open-src/proto/xineramaproto/Xsun-extended-proto.patch	Fri Jan 30 16:30:27 2009 -0800
+++ b/open-src/proto/xineramaproto/Xsun-extended-proto.patch	Tue Feb 03 19:18:42 2009 -0800
@@ -5,22 +5,32 @@
 we still have this here for now.
 
 For more info, see:
- http://blogs.sun.com/roller/page/alanc?entry=xinerama_protocol_clashes_on_solaris
+ http://blogs.sun.com/alanc/entry/xinerama_protocol_clashes_on_solaris
 
-diff -uwb build_32/xineramaproto-1.1.2/panoramiXext.h ../../../xc/include/extensions//panoramiXext.h
---- panoramiXext.h	Fri Apr 23 11:43:06 2004
-+++ panoramiXext.h	Tue Apr 18 17:41:37 2006
-@@ -46,3 +46,76 @@
+diff -urp -x '*~' -x '*.orig' panoramiXext.h panoramiXext.h
+--- panoramiXext.h	2004-04-23 11:43:06.000000000 -0700
++++ panoramiXext.h	2009-02-02 18:17:16.814431000 -0800
+@@ -30,6 +30,9 @@ Equipment Corporation.
+ 
+ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
+ 
++#ifndef _panoramiXext_h
++#define _panoramiXext_h
++
+ #define PANORAMIX_MAJOR_VERSION         1       /* current version number */
+ #define PANORAMIX_MINOR_VERSION         1
+ 
+@@ -46,3 +49,68 @@ typedef struct {
  extern XPanoramiXInfo *XPanoramiXAllocInfo (
      void
  );        
 +
-+#ifdef SUNSOFT
++#if defined(SUNSOFT) && !defined(XORGSERVER)
 +/************************************************************************
 + * Xsun addition to Xinerama 1.0 protocol, now deprecated in favor of 1.1
 + * protocol.
 + *
-+ * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
++ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 + *
 + * Permission is hereby granted, free of charge, to any person obtaining a
 + * copy of this software and associated documentation files (the
@@ -67,39 +77,31 @@
 +	DELTA	dx,dy;	/* delta in screen co-ord from virtual zero */
 +	POINT	x,y;	/* location of window in screen co-ord */
 +	DELTA 	wdx,wdy;/* size of window in screen co-ord */
-+}SubWID, *pSubWID;
++} SubWID, *pSubWID;
 +
 +typedef struct xineramainfo
 +{
 +	XinID 	wid;	/* Window ID of requested virtual window */
 +	SubWID	subs[MAXSCREEN];	/* there will be 16 slots */
-+}XineramaInfo, *pXineramaInfo;
-+#endif
++} XineramaInfo, *pXineramaInfo;
++#endif /* _XINERAMAINFO_ */
++
++#endif /* SUNSOFT & !XORGSERVER */
 +
-+#ifndef NO_PROTO_HERE
-+Bool XDgaGetXineramaInfo(
-+#if NeedFunctionPrototypes
-+/* this brakes the server
-+Display *, int, XID, XineramaInfo *
-+*/
-+#endif
-+);
-+#endif /* SUNSOFT */
-+
-+#endif
-diff -uwb build_32/xineramaproto-1.1.2/panoramiXproto.h ../../../xc/include/extensions//panoramiXproto.h
---- panoramiXproto.h	Fri Apr 23 11:43:06 2004
-+++ panoramiXproto.h	Tue Apr 18 17:42:17 2006
-@@ -189,4 +189,85 @@
++#endif /* _panoramiXext_h */
+diff -urp -x '*~' -x '*.orig' panoramiXproto.h panoramiXproto.h
+--- panoramiXproto.h	2004-04-23 11:43:06.000000000 -0700
++++ panoramiXproto.h	2009-02-02 18:17:16.824809000 -0800
+@@ -189,4 +189,64 @@ typedef struct {
  } xXineramaScreenInfo;
  #define sz_XineramaScreenInfo 8
  
-+#ifdef SUNSOFT
++#if defined(SUNSOFT) && !defined(XORGSERVER)
 +/************************************************************************
 + * Xsun addition to Xinerama 1.0 protocol, now deprecated in favor of 1.1
 + * protocol.
 + *
-+ * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
++ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 + *
 + * Permission is hereby granted, free of charge, to any person obtaining a
 + * copy of this software and associated documentation files (the
@@ -126,34 +128,13 @@
 + * or other dealings in this Software without prior written authorization
 + * of the copyright holder.
 + */
-+#pragma ident   "@(#)Xsun-extended-proto.patch	1.1	06/06/12 SMI"
++#pragma ident   "@(#)Xsun-extended-proto.patch	1.2	09/02/03 SMI"
++
++#include <X11/extensions/panoramiXext.h>
 +
 +#define X_PanoramiXGetInfo	4
 +#define X_XineramaInfo		4
 +
-+#ifndef _XINERAMAINFO_
-+#define _XINERAMAINFO_
-+#define XinID	int
-+#define MAXSCREEN 16
-+#define DELTA	int
-+#define POINT	int
-+
-+typedef struct subwid
-+{
-+	XinID	wid;	/* sub window id */
-+	DELTA	dx,dy;	/* delta in screen co-ord from virtual zero */
-+	POINT	x,y;	/* location of window in screen co-ord */
-+	DELTA 	wdx,wdy;/* size of window in screen co-ord */
-+}SubWID, *pSubWID;
-+
-+typedef struct xineramainfo
-+{
-+	XinID 	wid;	/* Window ID of requested virtual window */
-+	SubWID	subs[MAXSCREEN];	/* there will be 16 slots */
-+}XineramaInfo, *pXineramaInfo;
-+
-+#endif
-+
 +typedef struct _XXineramaInfoReply
 +{
 +	BYTE	type;
@@ -173,6 +154,6 @@
 +}xXineramaInfoReq;
 +
 +#define sz_xXineramaInfoReq 8
-+#endif /* SUNSOFT */
++#endif /* SUNSOFT & !XORGSERVER */
 +
  #endif