[PATCH:libX11 1/8] Avoid .TS H and .TH for now as it doesn't alter the output in this case, and improve the output with mandoc(1).

2013-06-02 Thread Thomas Klausner
---
 man/XCreateGC.man | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/man/XCreateGC.man b/man/XCreateGC.man
index 62a2f00..de0d039 100644
--- a/man/XCreateGC.man
+++ b/man/XCreateGC.man
@@ -460,7 +460,7 @@ are:
 .\" and operation.
 .\".CP T 1
 .\"Display Functions
-.TS H
+.TS
 lw(1.5i) cw(.5i) lw(2i).
 _
 .sp 6p
@@ -469,7 +469,6 @@ Function Name   Value   Operation
 .sp 6p
 _
 .sp 6p
-.TH
 T{
 .ZN GXclear
 T} T{
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXScrnSaver] Don't declare a 'const char *' when you pass it to a 'char *'.

2013-06-02 Thread Thomas Klausner
---
 src/XScrnSaver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c
index 2a89246..bf53c03 100644
--- a/src/XScrnSaver.c
+++ b/src/XScrnSaver.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from the 
X Consortium.
 
 static XExtensionInfo _screen_saver_info_data;
 static XExtensionInfo *screen_saver_info = &_screen_saver_info_data;
-static const char *screen_saver_extension_name = ScreenSaverName;
+static char *screen_saver_extension_name = ScreenSaverName;
 
 #define ScreenSaverCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, screen_saver_extension_name, val)
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXfont] Protect config.h inclusion with ifdef HAVE_CONFIG_H, like usual.

2013-06-02 Thread Thomas Klausner
---
 src/fontfile/bunzip2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/fontfile/bunzip2.c b/src/fontfile/bunzip2.c
index 44d19f0..4078796 100644
--- a/src/fontfile/bunzip2.c
+++ b/src/fontfile/bunzip2.c
@@ -26,7 +26,9 @@
  */
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include 
 #include 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libX11 3/8] ifdef out code that truncates the source length to the destination length if it is larger. Seems useless to do that since the code tests for both source length and destination to be

2013-06-02 Thread Thomas Klausner
---
 modules/lc/gen/lcGenConv.c | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
index 42d63c5..5a4fd64 100644
--- a/modules/lc/gen/lcGenConv.c
+++ b/modules/lc/gen/lcGenConv.c
@@ -764,8 +764,10 @@ mbstowcs_org(
 return( 0 );
 }
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -921,8 +923,10 @@ wcstombs_org(
 int defstr_len = strlen(default_string);
 
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -1080,8 +1084,10 @@ wcstocts(
 int from_size = *from_left;
 char *ext_seg_len = NULL;
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -1272,8 +1278,10 @@ ctstowcs(
 return( 0 );
 }
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -1666,8 +1674,10 @@ mbstostr(
 return( 0 );
 }
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -1957,8 +1967,10 @@ wcstostr(
 int defstr_len = strlen(default_string);
 
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -2114,8 +2126,10 @@ wctocs(
 char *outbufptr = *to;
 int from_size = *from_left;
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 if (*from_left && *to_left) {
 
@@ -2427,8 +2441,10 @@ strtombs(
 char *outbufptr = *to;
 int from_size = *from_left;
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
@@ -2537,8 +2553,10 @@ strtowcs(
 wchar_t *outbufptr = (wchar_t *)*to;
 int from_size = *from_left;
 
+#ifdef notdef
 if (*from_left > *to_left)
 *from_left = *to_left;
+#endif
 
 while (*from_left && *to_left) {
 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libX11 7/8] Add missing stdio header for printf(3) in DEBUG build.

2013-06-02 Thread Thomas Klausner
---
 src/xcms/cmsMath.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/xcms/cmsMath.c b/src/xcms/cmsMath.c
index 70b0675..487eb3f 100644
--- a/src/xcms/cmsMath.c
+++ b/src/xcms/cmsMath.c
@@ -35,6 +35,10 @@ in this Software without prior written authorization from 
The Open Group.
 #include "Xlibint.h"
 #include "Xcmsint.h"
 
+#ifdef DEBUG
+#include 
+#endif
+
 #include 
 #ifndef DBL_EPSILON
 #define DBL_EPSILON 1e-6
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libX11 5/8] Let libX11 load and make available the newer (X11R6) callback-based API for XIM (expected by emacs).

2013-06-02 Thread Thomas Klausner
Patch from Ian D. Leroux  on pkgsrc-users
following a hint by Nhat Minh Lê .
---
 nls/iso8859-1/XI18N_OBJS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nls/iso8859-1/XI18N_OBJS b/nls/iso8859-1/XI18N_OBJS
index 32e4f35..3a9a1bb 100644
--- a/nls/iso8859-1/XI18N_OBJS
+++ b/nls/iso8859-1/XI18N_OBJS
@@ -3,6 +3,6 @@
 #  XI18N objects table for euro locales
 #
 XLCcommon/xlibi18n _XlcGenericLoader   # XLC_open
-XIMcommon/ximcp_XimOpenIM  # XIM_open
+XIMcommon/ximcp_XimOpenIM _XimRegisterIMInstantiateCallback  
_XimUnRegisterIMInstantiateCallback # XIM_openXIM_register XIM_unregister
 XOMcommon/xomGeneric   _XomGenericOpenOM   # XOM_open
 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH:libX11 6/8] Check for symbol existence with #ifdef, not #if.

2013-06-02 Thread Thomas Klausner
---
 src/XlibInt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XlibInt.c b/src/XlibInt.c
index b06e57b..92a4340 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -239,7 +239,7 @@ void _XSeqSyncFunction(
 static int
 _XPrivSyncFunction (Display *dpy)
 {
-#if XTHREADS
+#ifdef XTHREADS
 assert(!dpy->lock_fns);
 #endif
 assert(dpy->synchandler == _XPrivSyncFunction);
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libX11 2/8] Let libX11 load and make available the newer (X11R6) callback-based API for XIM (expected by emacs).

2013-06-02 Thread Thomas Klausner
Patch from Ian D. Leroux  on pkgsrc-users
following a hint by Nhat Minh Lê .
---
 nls/C/XI18N_OBJS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nls/C/XI18N_OBJS b/nls/C/XI18N_OBJS
index 32e4f35..3a9a1bb 100644
--- a/nls/C/XI18N_OBJS
+++ b/nls/C/XI18N_OBJS
@@ -3,6 +3,6 @@
 #  XI18N objects table for euro locales
 #
 XLCcommon/xlibi18n _XlcGenericLoader   # XLC_open
-XIMcommon/ximcp_XimOpenIM  # XIM_open
+XIMcommon/ximcp_XimOpenIM _XimRegisterIMInstantiateCallback  
_XimUnRegisterIMInstantiateCallback # XIM_openXIM_register XIM_unregister
 XOMcommon/xomGeneric   _XomGenericOpenOM   # XOM_open
 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH:libX11 8/8] Deal with the limited range of VAX floating point numbers when compiling for VAX.

2013-06-02 Thread Thomas Klausner
---
 src/xcms/cmsTrig.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/xcms/cmsTrig.c b/src/xcms/cmsTrig.c
index a917b78..fc65d9b 100644
--- a/src/xcms/cmsTrig.c
+++ b/src/xcms/cmsTrig.c
@@ -71,7 +71,11 @@ _XcmsModuloF(
 #define XCMS_SIXTHPI   0.523598775598298820
 #define XCMS_RADIANS(d)((d) * XCMS_PI / 180.0)
 #define XCMS_DEGREES(r)((r) * 180.0 / XCMS_PI)
+#ifdef __vax__
+#define XCMS_X6_UNDERFLOWS (3.784659e-07)  /* X**6 almost underflows*/
+#else
 #define XCMS_X6_UNDERFLOWS (4.209340e-52)  /* X**6 almost underflows */
+#endif
 #define XCMS_X16_UNDERFLOWS(5.421010e-20)  /* X**16 almost underflows*/
 #define XCMS_CHAR_BIT  8
 #define XCMS_LONG_MAX  0x7FFF
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libX11 4/8] Let libX11 load and make available the newer (X11R6) callback-based API for XIM (expected by emacs).

2013-06-02 Thread Thomas Klausner
Patch from Ian D. Leroux  on pkgsrc-users
following a hint by Nhat Minh Lê .

AND

fix a couple of defaults that make emacs and a few other things work.
as reported on tech-x11.
---
 nls/en_US.UTF-8/XI18N_OBJS | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nls/en_US.UTF-8/XI18N_OBJS b/nls/en_US.UTF-8/XI18N_OBJS
index f201bf4..97b30b9 100644
--- a/nls/en_US.UTF-8/XI18N_OBJS
+++ b/nls/en_US.UTF-8/XI18N_OBJS
@@ -3,6 +3,5 @@
 #  XI18N objects table for euro locales
 #
 XLCcommon/xlcUTF8Load  _XlcUtf8Loader  # XLC_open
-XOMcommon/xomLTRTTB_XomGenericOpenOM   # XOM_open
-XIMcommon/xiiimp   _SwitchOpenIM   # XIM_open
-XIMcommon/xiiimp   _XimpLocalOpenIM# XIM_open
+XOMcommon/xomGeneric   _XomGenericOpenOM   # XOM_open
+XIMcommon/ximcp_XimOpenIM _XimRegisterIMInstantiateCallback  
_XimUnRegisterIMInstantiateCallback # XIM_openXIM_register XIM_unregister
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH:libXmu] Fix a const issue.

2013-06-02 Thread Thomas Klausner
---
 src/StrToGrav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/StrToGrav.c b/src/StrToGrav.c
index ca8bb53..e7ad699 100644
--- a/src/StrToGrav.c
+++ b/src/StrToGrav.c
@@ -106,7 +106,7 @@ Boolean
 XmuCvtGravityToString(Display *dpy, XrmValue *args, Cardinal *num_args,
  XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
 {
-  static char *buffer;
+  static const char *buffer;
   Cardinal size;
   struct _namepair *np;
   XtGravity gravity;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXtst] Fix some const issues.

2013-06-02 Thread Thomas Klausner
---
 src/XRecord.c | 2 +-
 src/XTest.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/XRecord.c b/src/XRecord.c
index 5bbd5ac..e146778 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -74,7 +74,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)
 
 static XExtensionInfo _xrecord_info_data;
 static XExtensionInfo *xrecord_info = &_xrecord_info_data;
-static const char *xrecord_extension_name = RECORD_NAME;
+static char *xrecord_extension_name = RECORD_NAME;
 
 #define XRecordCheckExtension(dpy,i,val) \
 XextCheckExtension(dpy, i, xrecord_extension_name, val)
diff --git a/src/XTest.c b/src/XTest.c
index 3e4bb17..04370e4 100644
--- a/src/XTest.c
+++ b/src/XTest.c
@@ -40,7 +40,7 @@ from The Open Group.
 
 static XExtensionInfo _xtest_info_data;
 static XExtensionInfo *xtest_info = &_xtest_info_data;
-static const char *xtest_extension_name = XTestExtensionName;
+static char *xtest_extension_name = XTestExtensionName;
 
 #define XTestCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, xtest_extension_name, val)
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:mkfontscale 1/2] Protect config.h inclusion like usual.

2013-06-02 Thread Thomas Klausner
---
 ident.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ident.c b/ident.c
index bf54483..8addee7 100644
--- a/ident.c
+++ b/ident.c
@@ -47,7 +47,9 @@
and 0 if it should be processed normally.  identifyBitmap is
much faster than parsing the whole font. */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include 
 #include 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:mkfontscale 2/2] Remove a couple of 'const' that aren't OK for the caller.

2013-06-02 Thread Thomas Klausner
---
 mkfontscale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mkfontscale.c b/mkfontscale.c
index 53c5303..15efaac 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -60,7 +60,7 @@
 #define QUOTE(x)   #x
 #define STRINGIFY(x)   QUOTE(x)
 
-static const char *encodings_array[] =
+static char *encodings_array[] =
 { "ascii-0",
   "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
   "iso8859-6", "iso8859-6.8", "iso8859-6.8x", "iso8859-6.16",
@@ -79,7 +79,7 @@ static const char *encodings_array[] =
   "gb2312.1980-0", "gb18030.2000-0", "gb18030.2000-1",
   "ksc5601.1987-0", "ksc5601.1992-3"};
 
-static const char *extra_encodings_array[] =
+static char *extra_encodings_array[] =
 { "iso10646-1", "adobe-fontspecific", "microsoft-symbol" };
 
 static ListPtr encodings, extra_encodings;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xauth] Work around "error: assignment discards qualifiers from pointer target type"

2013-06-02 Thread Thomas Klausner
Use __UNCONST where available.
XXX: This should be fixed in a better way instead.
---
 process.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/process.c b/process.c
index 283b4a1..928941f 100644
--- a/process.c
+++ b/process.c
@@ -1894,7 +1894,10 @@ do_generate(const char *inputfilename, int lineno, int 
argc, const char **argv)
 auth_in->name = DEFAULT_PROTOCOL;
 }
 else
-   auth_in->name = protoname;
+#ifndef __UNCONST
+# define __UNCONST(x) x
+#endif
+   auth_in->name = __UNCONST(protoname);
 auth_in->name_length = strlen(auth_in->name);
 auth_in->data = authdata;
 auth_in->data_length = authdatalen;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xrandr 2/2] Use __UNCONST to work around const problem.

2013-06-02 Thread Thomas Klausner
XXX: should probably be fixed differently.
---
 xrandr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xrandr.c b/xrandr.c
index da786cb..0b285a3 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -1524,7 +1524,7 @@ crtc_set_transform (crtc_t *crtc, transform_t *transform)
 if (major > 1 || (major == 1 && minor >= 3))
XRRSetCrtcTransform (dpy, crtc->crtc.xid,
 &transform->transform,
-transform->filter,
+__UNCONST(transform->filter),
 transform->params,
 transform->nparams);
 }
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xrandr 1/2] Protect config.h like usual.

2013-06-02 Thread Thomas Klausner
---
 xrandr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xrandr.c b/xrandr.c
index 94e5c2e..da786cb 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -41,7 +41,9 @@
 #include 
 #include 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 static char*program_name;
 static Display *dpy;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXt] Add missing comma to fix DEBUG build.

2013-06-02 Thread Thomas Klausner
---
 src/ResConfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ResConfig.c b/src/ResConfig.c
index 161366a..152d9cf 100644
--- a/src/ResConfig.c
+++ b/src/ResConfig.c
@@ -981,7 +981,7 @@ _XtResourceConfigurationEH (
resource = XtNewString (data_ptr);
value = XtNewString (data_value);
 #ifdef DEBUG
-   fprintf (stderr, "resource_len=%d\n"
+   fprintf (stderr, "resource_len=%d\n",
 resource_len);
fprintf (stderr, "resource = %s\t value = %s\n",
 resource, value);
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 7/8] Add missing stdio header for printf(3) in DEBUG build.

2013-06-02 Thread walter harms


Am 02.06.2013 20:49, schrieb Thomas Klausner:
> ---
>  src/xcms/cmsMath.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/xcms/cmsMath.c b/src/xcms/cmsMath.c
> index 70b0675..487eb3f 100644
> --- a/src/xcms/cmsMath.c
> +++ b/src/xcms/cmsMath.c
> @@ -35,6 +35,10 @@ in this Software without prior written authorization from 
> The Open Group.
>  #include "Xlibint.h"
>  #include "Xcmsint.h"
>  
> +#ifdef DEBUG
> +#include 
> +#endif
> +

I guess libX11 can take the overhead even when DEBUG is nodef
just include.

#include   /* debug code needs that */

re,
 wh


>  #include 
>  #ifndef DBL_EPSILON
>  #define DBL_EPSILON 1e-6
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 7/8] Add missing stdio header for printf(3) in DEBUG build.

2013-06-02 Thread Thomas Klausner
On Sun, Jun 02, 2013 at 10:02:39PM +0200, walter harms wrote:
> 
> 
> Am 02.06.2013 20:49, schrieb Thomas Klausner:
> > ---
> >  src/xcms/cmsMath.c | 4 
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/xcms/cmsMath.c b/src/xcms/cmsMath.c
> > index 70b0675..487eb3f 100644
> > --- a/src/xcms/cmsMath.c
> > +++ b/src/xcms/cmsMath.c
> > @@ -35,6 +35,10 @@ in this Software without prior written authorization 
> > from The Open Group.
> >  #include "Xlibint.h"
> >  #include "Xcmsint.h"
> >  
> > +#ifdef DEBUG
> > +#include 
> > +#endif
> > +
> 
> I guess libX11 can take the overhead even when DEBUG is nodef
> just include.
> 
> #include   /* debug code needs that */

Fine with me. Should I send an updated patch for that?
 Thomas
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXinerama] Const fix.

2013-06-02 Thread Thomas Klausner
---
 src/Xinerama.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Xinerama.c b/src/Xinerama.c
index 67a35b5..17e8ec8 100644
--- a/src/Xinerama.c
+++ b/src/Xinerama.c
@@ -51,7 +51,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)
 
 static XExtensionInfo _panoramiX_ext_info_data;
 static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
-static const char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
+static char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
 
 #define PanoramiXCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, panoramiX_extension_name, val)
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXRes] Const fix.

2013-06-02 Thread Thomas Klausner
---
 src/XRes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XRes.c b/src/XRes.c
index 51e905f..aef32ce 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -28,7 +28,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)
 
 static XExtensionInfo _xres_ext_info_data;
 static XExtensionInfo *xres_ext_info = &_xres_ext_info_data;
-static const char *xres_extension_name = XRES_NAME;
+static char *xres_extension_name = XRES_NAME;
 
 #define XResCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, xres_extension_name, val)
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXxf86vm] Const fix.

2013-06-02 Thread Thomas Klausner
---
 src/XF86VMode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XF86VMode.c b/src/XF86VMode.c
index fb94816..5cd8020 100644
--- a/src/XF86VMode.c
+++ b/src/XF86VMode.c
@@ -62,7 +62,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)
 
 static XExtensionInfo _xf86vidmode_info_data;
 static XExtensionInfo *xf86vidmode_info = &_xf86vidmode_info_data;
-static const char *xf86vidmode_extension_name = XF86VIDMODENAME;
+static char *xf86vidmode_extension_name = XF86VIDMODENAME;
 
 #define XF86VidModeCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, xf86vidmode_extension_name, val)
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libXrandr] Add some casts for gcc with more warnings enabled.

2013-06-02 Thread Thomas Klausner
---
 src/XrrProvider.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/XrrProvider.c b/src/XrrProvider.c
index 309e321..cc339cd 100644
--- a/src/XrrProvider.c
+++ b/src/XrrProvider.c
@@ -77,7 +77,7 @@ XRRGetProviderResources(Display *dpy, Window window)
 xrpr->nproviders = rep.nProviders;
 xrpr->providers = (RRProvider *)(xrpr + 1);
 
-_XRead32(dpy, xrpr->providers, rep.nProviders << 2);
+_XRead32(dpy, (RRProvider *)xrpr->providers, rep.nProviders << 2);
 
 if (nbytes > nbytesRead)
   _XEatData (dpy, (unsigned long) (nbytes - nbytesRead));
@@ -156,7 +156,7 @@ XRRGetProviderInfo(Display *dpy, XRRScreenResources 
*resources, RRProvider provi
 _XRead32(dpy, xpi->outputs, rep.nOutputs << 2);
 
 _XRead32(dpy, xpi->associated_providers, rep.nAssociatedProviders << 2);
-_XRead32(dpy, xpi->associated_capability, rep.nAssociatedProviders << 2);
+_XRead32(dpy, (RRProvider *)xpi->associated_capability, 
rep.nAssociatedProviders << 2);
 
 _XReadPad(dpy, xpi->name, rep.nameLength);
 xpi->name[rep.nameLength] = '\0';
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xdm] Add a cast to avoid a compiler error.

2013-06-02 Thread Thomas Klausner
XXX: this code should be revisited.
---
 xdm/prngc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdm/prngc.c b/xdm/prngc.c
index f0db8eb..fe737e3 100644
--- a/xdm/prngc.c
+++ b/xdm/prngc.c
@@ -130,7 +130,7 @@ reopen:
msg[0] = 0x02;
msg[1] = len;
 
-   if (atomicio(write, fd, msg, sizeof(msg)) != sizeof(msg)) {
+   if (atomicio((ssize_t (*)(int, void *, size_t))write, fd, msg, 
sizeof(msg)) != sizeof(msg)) {
if (errno == EPIPE && errors < 10) {
close(fd);
errors++;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xkbcomp] Protect config.h like usual.

2013-06-02 Thread Thomas Klausner
---
 utils.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils.h b/utils.h
index 417d104..b00067d 100644
--- a/utils.h
+++ b/utils.h
@@ -35,7 +35,9 @@
 #include   
 
 #include 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #ifndef NUL
 #defineNUL '\0'
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libpciaccess 1/3] Protect config.h like usual.

2013-06-02 Thread Thomas Klausner
---
 src/common_bridge.c  | 3 +++
 src/common_device_name.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/common_bridge.c b/src/common_bridge.c
index 82a13fd..b4b5d7e 100644
--- a/src/common_bridge.c
+++ b/src/common_bridge.c
@@ -29,7 +29,10 @@
  * \author Ian Romanick 
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include 
 #include 
 #include 
diff --git a/src/common_device_name.c b/src/common_device_name.c
index ad9ed9d..8c73dbd 100644
--- a/src/common_device_name.c
+++ b/src/common_device_name.c
@@ -28,7 +28,10 @@
  * with a particular device or vendor.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include 
 #include 
 #include 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libpciaccess 2/3] Remove useless extra "const" in "const sometype const * var = value; ". Found using clang -Wduplicate-decl-specifier.

2013-06-02 Thread Thomas Klausner
---
 src/common_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common_interface.c b/src/common_interface.c
index 6dccf8e..8eace4e 100644
--- a/src/common_interface.c
+++ b/src/common_interface.c
@@ -268,7 +268,7 @@ pci_device_map_range(struct pci_device *dev, pciaddr_t base,
 
 
 for (region = 0; region < 6; region++) {
-const struct pci_mem_region const* r = &dev->regions[region];
+const struct pci_mem_region * r = &dev->regions[region];
 
 if (r->size != 0) {
 if ((r->base_addr <= base) && ((r->base_addr + r->size) > base)) {
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:libpciaccess 3/3] Update NetBSD support. From Michael Lorenz .

2013-06-02 Thread Thomas Klausner
---
 configure.ac |   4 +-
 src/netbsd_pci.c | 471 +++
 2 files changed, 342 insertions(+), 133 deletions(-)

diff --git a/configure.ac b/configure.ac
index 91374e5..3441b63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,10 +77,10 @@ case $host_os in
*netbsd*)
case $host in
*i386*)
-   PCIACCESS_LIBS="-li386"
+   PCIACCESS_LIBS="-li386 -lpci"
;;
*x86_64*|*amd64*)
-   PCIACCESS_LIBS="-lx86_64"
+   PCIACCESS_LIBS="-lx86_64 -lpci"
;;
esac
netbsd=yes
diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c
index 63585e3..f5a90c0 100644
--- a/src/netbsd_pci.c
+++ b/src/netbsd_pci.c
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2008 Juan Romero Pardines
  * Copyright (c) 2008 Mark Kettenis
+ * Copyright (c) 2009 Michael Lorenz
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -20,12 +21,15 @@
 #include 
 #include 
 
+#ifdef HAVE_MTRR
 #include 
 #include 
+#define netbsd_set_mtrr(mr, num)   _X86_SYSARCH_L(set_mtrr)(mr, num)
+#endif
 
+#include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -35,126 +39,152 @@
 #include 
 
 
+#include 
+#include 
+
 #include "pciaccess.h"
 #include "pciaccess_private.h"
 
-static int pcifd;
+typedef struct _pcibus {
+   int fd; /* /dev/pci* */
+   int num;/* bus number */
+   int maxdevs;/* maximum number of devices */
+} PciBus;
+
+static PciBus buses[32];   /* indexed by pci_device.domain */
+static int nbuses = 0; /* number of buses found */
+
+/*
+ * NetBSD's userland has a /dev/pci* entry for each bus but userland has no way
+ * to tell if a bus is a subordinate of another one or if it's on a different
+ * host bridge. On some architectures ( macppc for example ) all root buses 
have
+ * bus number 0 but on sparc64 for example the two roots in an Ultra60 have
+ * different bus numbers - one is 0 and the other 128.
+ * With each /dev/pci* we can map everything on the same root and we can also
+ * see all devices on the same root, trying to do that causes problems though:
+ * - since we can't tell which /dev/pci* is a subordinate we would find some
+ *   devices more than once
+ * - we would have to guess subordinate bus numbers which is a waste of time
+ *   since we can ask each /dev/pci* for its bus number so we can scan only the
+ *   buses we know exist, not all 256 which may exist in each domain.
+ * - some bus_space_mmap() methods may limit mappings to address ranges which
+ *   belong to known devices on that bus only.
+ * Each host bridge may or may not have its own IO range, to avoid guesswork
+ * here each /dev/pci* will let userland map its appropriate IO range at
+ * PCI_MAGIC_IO_RANGE if defined in 
+ * With all this we should be able to use any PCI graphics device on any PCI
+ * bus on any architecture as long as Xorg has a driver, without allowing
+ * arbitrary mappings via /dev/mem and without userland having to know or care
+ * about translating bus addresses to physical addresses or the other way 
+ * around.
+ */
 
 static int
-pci_read(int bus, int dev, int func, uint32_t reg, uint32_t *val)
+pci_read(int domain, int bus, int dev, int func, uint32_t reg, uint32_t *val)
 {
-   struct pciio_bdf_cfgreg io;
-   int err;
+   uint32_t rval;
 
-   bzero(&io, sizeof(io));
-   io.bus = bus;
-   io.device = dev;
-   io.function = func;
-   io.cfgreg.reg = reg;
+   if ((domain < 0) || (domain > nbuses))
+   return -1;
 
-   err = ioctl(pcifd, PCI_IOC_BDF_CFGREAD, &io);
-   if (err)
-   return (err);
+   if (pcibus_conf_read(buses[domain].fd, (unsigned int)bus,
+   (unsigned int)dev, (unsigned int)func, reg, &rval) == -1)
+   return (-1);
 
-   *val = io.cfgreg.val;
+   *val = rval;
 
return 0;
 }
 
 static int
-pci_write(int bus, int dev, int func, uint32_t reg, uint32_t val)
+pci_write(int domain, int bus, int dev, int func, uint32_t reg, uint32_t val)
 {
-   struct pciio_bdf_cfgreg io;
 
-   bzero(&io, sizeof(io));
-   io.bus = bus;
-   io.device = dev;
-   io.function = func;
-   io.cfgreg.reg = reg;
-   io.cfgreg.val = val;
+   if ((domain < 0) || (domain > nbuses))
+   return -1;
 
-   return ioctl(pcifd, PCI_IOC_BDF_CFGWRITE, &io);
+   return pcibus_conf_write(buses[domain].fd, (unsigned int)bus,
+   (unsigned int)dev, (unsigned int)func, reg, val);
 }
 
 static int
-pci_nfuncs(int bus, int dev)
+pci_nfuncs(int domain, int bus, int dev)
 {
uint32_t hdr;
 
-   if (pci_read(bus, dev, 0, PCI_BHLC_REG, &hdr) != 0)
+   if ((domain < 0) || (domain > nbuses))
+   

[PATCH:xf86-video-ast] Use uint32_t for a variable that's passed to a function expecting a uint32_t.

2013-06-02 Thread Thomas Klausner
---
 src/ast_vgatool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index 513cf7b..378822a 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -2709,7 +2709,7 @@ void vGetDefaultSettings(ScrnInfoPtr pScrn)
 Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags)
 {
ASTRecPtr pAST;
-   ULONG ulData;
+   uint32_t ulData;
 
pAST = ASTPTR(pScrn);
 
@@ -3005,7 +3005,7 @@ GetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
 Bool bInitAST1180(ScrnInfoPtr pScrn)
 {
 ASTRecPtr pAST;
-ULONG ulData;
+uint32_t ulData;
 
 pAST = ASTPTR(pScrn);
 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xf86-video-glint] when doing DDC2 on Permedia2 make sure to clear the USE_MONID bit in the DDCdata register so the i2c bits actually do something Now DDC2 works on my PGX32 / Raptor 8P

2013-06-02 Thread Thomas Klausner
>From Michael Lorez 
---
 src/pm2_dac.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/pm2_dac.c b/src/pm2_dac.c
index 85093ff..b6771a5 100644
--- a/src/pm2_dac.c
+++ b/src/pm2_dac.c
@@ -458,8 +458,14 @@ Permedia2I2CPutBits(I2CBusPtr b, int scl, int sda)
 {
 GLINTPtr pGlint = (GLINTPtr) b->DriverPrivate.ptr;
 int r = (pGlint->DDCBus == b) ? PMDDCData : VSSerialBusControl;
+/*
+This is bogus.
+All this line does is to preserve the USE_MONID bit if set which prevents
+the i2c bits from doing anything
 CARD32 v = GLINT_READ_REG(r) & ~(ClkOut | DataOut);
-
+*/
+CARD32 v = 0;
+   
 if (scl > 0) v |= ClkOut;
 if (sda > 0) v |= DataOut;
 
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xf86-video-i740] I740_Sync is only define if HAVE_XAA_H, so limit prototype to same define.

2013-06-02 Thread Thomas Klausner
---
 src/i740_dga.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/i740_dga.c b/src/i740_dga.c
index 532d614..eb362c5 100644
--- a/src/i740_dga.c
+++ b/src/i740_dga.c
@@ -41,10 +41,10 @@
 
 static Bool I740_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int 
*, int *, int *);
 static Bool I740_SetMode(ScrnInfoPtr, DGAModePtr);
-static void I740_Sync(ScrnInfoPtr);
 static int  I740_GetViewport(ScrnInfoPtr);
 static void I740_SetViewport(ScrnInfoPtr, int, int, int);
 #ifdef HAVE_XAA_H
+static void I740_Sync(ScrnInfoPtr);
 static void I740_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
 static void I740_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
 #if 0
@@ -57,8 +57,8 @@ static DGAFunctionRec I740DGAFuncs = {
I740_SetMode,
I740_SetViewport,
I740_GetViewport,
-   I740_Sync,
 #ifdef HAVE_XAA_H
+   I740_Sync,
I740_FillRect,
I740_BlitRect,
 #if 0
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Stop

2013-06-02 Thread Paul Shuler

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH:libX11 7/8] Add missing stdio header for printf(3) in DEBUG build.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 01:04 PM, Thomas Klausner wrote:

On Sun, Jun 02, 2013 at 10:02:39PM +0200, walter harms wrote:



Am 02.06.2013 20:49, schrieb Thomas Klausner:

---
  src/xcms/cmsMath.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/xcms/cmsMath.c b/src/xcms/cmsMath.c
index 70b0675..487eb3f 100644
--- a/src/xcms/cmsMath.c
+++ b/src/xcms/cmsMath.c
@@ -35,6 +35,10 @@ in this Software without prior written authorization from 
The Open Group.
  #include "Xlibint.h"
  #include "Xcmsint.h"

+#ifdef DEBUG
+#include 
+#endif
+


I guess libX11 can take the overhead even when DEBUG is nodef
just include.

#include   /* debug code needs that */


Fine with me. Should I send an updated patch for that?


No need - the original patch seems fine to me.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 8/8] Deal with the limited range of VAX floating point numbers when compiling for VAX.

2013-06-02 Thread Alan Coopersmith

People still compile X for VAX?   I had no idea...

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 3/8] ifdef out code that truncates the source length to the destination length if it is larger. Seems useless to do that since the code tests for both source length and destination t

2013-06-02 Thread Alan Coopersmith

Style tip: the first line of a commit message should be a short summary
that fits into an 80 column screen - that's what git shows as the commit
title and the changelog message that goes into new release announcements,
as well as the subject line of git format-patch output (as you can see,
this patch has a subject line that's too long to read in most mail clients).

Is there any point in ifdef'ing these out vs. removing them as commit
002b36e308a26a1 did for one already?

In any case, I don't think this is a release blocker for 1.6, so should
wait until after that release is made.

-alan-


On 06/ 2/13 11:49 AM, Thomas Klausner wrote:

---
  modules/lc/gen/lcGenConv.c | 18 ++
  1 file changed, 18 insertions(+)

diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
index 42d63c5..5a4fd64 100644
--- a/modules/lc/gen/lcGenConv.c
+++ b/modules/lc/gen/lcGenConv.c
@@ -764,8 +764,10 @@ mbstowcs_org(
  return( 0 );
  }

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -921,8 +923,10 @@ wcstombs_org(
  int defstr_len = strlen(default_string);


+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -1080,8 +1084,10 @@ wcstocts(
  int from_size = *from_left;
  char *ext_seg_len = NULL;

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -1272,8 +1278,10 @@ ctstowcs(
  return( 0 );
  }

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -1666,8 +1674,10 @@ mbstostr(
  return( 0 );
  }

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -1957,8 +1967,10 @@ wcstostr(
  int defstr_len = strlen(default_string);


+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -2114,8 +2126,10 @@ wctocs(
  char *outbufptr = *to;
  int from_size = *from_left;

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  if (*from_left && *to_left) {

@@ -2427,8 +2441,10 @@ strtombs(
  char *outbufptr = *to;
  int from_size = *from_left;

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {

@@ -2537,8 +2553,10 @@ strtowcs(
  wchar_t *outbufptr = (wchar_t *)*to;
  int from_size = *from_left;

+#ifdef notdef
  if (*from_left > *to_left)
  *from_left = *to_left;
+#endif

  while (*from_left && *to_left) {





--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 3/8] ifdef out code that truncates the source length to the destination length if it is larger. Seems useless to do that since the code tests for both source length and destination t

2013-06-02 Thread Thomas Klausner
On Sun, Jun 02, 2013 at 04:15:55PM -0700, Alan Coopersmith wrote:
> Style tip: the first line of a commit message should be a short summary
> that fits into an 80 column screen - that's what git shows as the commit
> title and the changelog message that goes into new release announcements,
> as well as the subject line of git format-patch output (as you can see,
> this patch has a subject line that's too long to read in most mail clients).

Ok. I'll do that in the future.

> Is there any point in ifdef'ing these out vs. removing them as commit
> 002b36e308a26a1 did for one already?

Actually, no. I'll send an updated patch.

> In any case, I don't think this is a release blocker for 1.6, so should
> wait until after that release is made.

Fine with me, as long as it doesn't get lost :)
 Thomas

> 
>   -alan-
> 
> 
> On 06/ 2/13 11:49 AM, Thomas Klausner wrote:
> >---
> >  modules/lc/gen/lcGenConv.c | 18 ++
> >  1 file changed, 18 insertions(+)
> >
> >diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
> >index 42d63c5..5a4fd64 100644
> >--- a/modules/lc/gen/lcGenConv.c
> >+++ b/modules/lc/gen/lcGenConv.c
> >@@ -764,8 +764,10 @@ mbstowcs_org(
> >  return( 0 );
> >  }
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -921,8 +923,10 @@ wcstombs_org(
> >  int defstr_len = strlen(default_string);
> >
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -1080,8 +1084,10 @@ wcstocts(
> >  int from_size = *from_left;
> >  char *ext_seg_len = NULL;
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -1272,8 +1278,10 @@ ctstowcs(
> >  return( 0 );
> >  }
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -1666,8 +1674,10 @@ mbstostr(
> >  return( 0 );
> >  }
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -1957,8 +1967,10 @@ wcstostr(
> >  int defstr_len = strlen(default_string);
> >
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -2114,8 +2126,10 @@ wctocs(
> >  char *outbufptr = *to;
> >  int from_size = *from_left;
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  if (*from_left && *to_left) {
> >
> >@@ -2427,8 +2441,10 @@ strtombs(
> >  char *outbufptr = *to;
> >  int from_size = *from_left;
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >@@ -2537,8 +2553,10 @@ strtowcs(
> >  wchar_t *outbufptr = (wchar_t *)*to;
> >  int from_size = *from_left;
> >
> >+#ifdef notdef
> >  if (*from_left > *to_left)
> >  *from_left = *to_left;
> >+#endif
> >
> >  while (*from_left && *to_left) {
> >
> >
> 
> 
> -- 
>   -Alan Coopersmith-  alan.coopersm...@oracle.com
>Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 8/8] Deal with the limited range of VAX floating point numbers when compiling for VAX.

2013-06-02 Thread Thomas Klausner
On Sun, Jun 02, 2013 at 04:11:08PM -0700, Alan Coopersmith wrote:
> People still compile X for VAX?   I had no idea...

Yes, NetBSD-6.1 was released for vax, including X.

http://netbsd.org/ports/vax/

Of course, it was cross-compiled.
 Thomas
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 1/8] Avoid .TS H and .TH for now as it doesn't alter the output in this case, and improve the output with mandoc(1).

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 11:49 AM, Thomas Klausner wrote:

---
  man/XCreateGC.man | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/man/XCreateGC.man b/man/XCreateGC.man
index 62a2f00..de0d039 100644
--- a/man/XCreateGC.man
+++ b/man/XCreateGC.man
@@ -460,7 +460,7 @@ are:
  .\" and operation.
  .\".CP T 1
  .\"Display Functions
-.TS H
+.TS
  lw(1.5i) cw(.5i) lw(2i).
  _
  .sp 6p
@@ -469,7 +469,6 @@ Function Name   Value   Operation
  .sp 6p
  _
  .sp 6p
-.TH
  T{
  .ZN GXclear
  T}T{



Reviewed, accepted and pushed for Xlib 1.6 as it's small & safe enough
to go in after the last RC.

To ssh://git.freedesktop.org/git/xorg/lib/libX11
   95a3881..96dcf74  master -> master

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libX11 7/8] Add missing stdio header for printf(3) in DEBUG build.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 11:49 AM, Thomas Klausner wrote:

---
  src/xcms/cmsMath.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/xcms/cmsMath.c b/src/xcms/cmsMath.c
index 70b0675..487eb3f 100644
--- a/src/xcms/cmsMath.c
+++ b/src/xcms/cmsMath.c
@@ -35,6 +35,10 @@ in this Software without prior written authorization from 
The Open Group.
  #include "Xlibint.h"
  #include "Xcmsint.h"

+#ifdef DEBUG
+#include 
+#endif
+
  #include 
  #ifndef DBL_EPSILON
  #define DBL_EPSILON 1e-6



Reviewed, accepted and pushed for Xlib 1.6 as it's small & safe enough
to go in after the last RC.

To ssh://git.freedesktop.org/git/xorg/lib/libX11
   96dcf74..4a89b7e  master -> master

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXScrnSaver] Don't declare a 'const char *' when you pass it to a 'char *'.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 11:56 AM, Thomas Klausner wrote:

---
  src/XScrnSaver.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c
index 2a89246..bf53c03 100644
--- a/src/XScrnSaver.c
+++ b/src/XScrnSaver.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from the 
X Consortium.

  static XExtensionInfo _screen_saver_info_data;
  static XExtensionInfo *screen_saver_info = &_screen_saver_info_data;
-static const char *screen_saver_extension_name = ScreenSaverName;
+static char *screen_saver_extension_name = ScreenSaverName;

  #define ScreenSaverCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, screen_saver_extension_name, val)



This should not be necessary since libXext was modified to take a const char:
http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=c0c2a0c7819c425f3df0992b6873a15c8ec27e01

I get no const mismatch warnings building current libXScrnSaver sources with 
gcc.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] Remove code limiting buffer size.

2013-06-02 Thread Thomas Klausner
Remove code that truncates the source length to the destination
length if it is larger. Seems useless to do that since the code
tests for both source length and destination to be non-zero. This
fixes cut-n-paste problem in xterm where the paste length was
limited to 1024 (BUFSIZ) in button.c
---
 modules/lc/gen/lcGenConv.c | 29 -
 1 file changed, 29 deletions(-)

diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
index 42d63c5..f051b8d 100644
--- a/modules/lc/gen/lcGenConv.c
+++ b/modules/lc/gen/lcGenConv.c
@@ -764,9 +764,6 @@ mbstowcs_org(
 return( 0 );
 }
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
ch = *inbufptr++;
@@ -920,10 +917,6 @@ wcstombs_org(
 const char *default_string = XLC_PUBLIC(lcd, default_string);
 int defstr_len = strlen(default_string);
 
-
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
 wc = *inbufptr++;
@@ -1080,9 +1073,6 @@ wcstocts(
 int from_size = *from_left;
 char *ext_seg_len = NULL;
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
 wc = *inbufptr++;
@@ -1272,9 +1262,6 @@ ctstowcs(
 return( 0 );
 }
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
ch = *inbufptr++;
@@ -1666,9 +1653,6 @@ mbstostr(
 return( 0 );
 }
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
ch = *inbufptr++;
@@ -1956,10 +1940,6 @@ wcstostr(
 const char *default_string = XLC_PUBLIC(lcd, default_string);
 int defstr_len = strlen(default_string);
 
-
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
 wc = *inbufptr++;
@@ -2114,9 +2094,6 @@ wctocs(
 char *outbufptr = *to;
 int from_size = *from_left;
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 if (*from_left && *to_left) {
 
 wc = *inbufptr++;
@@ -2427,9 +2404,6 @@ strtombs(
 char *outbufptr = *to;
 int from_size = *from_left;
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
 ch = *inbufptr++;
@@ -2537,9 +2511,6 @@ strtowcs(
 wchar_t *outbufptr = (wchar_t *)*to;
 int from_size = *from_left;
 
-if (*from_left > *to_left)
-*from_left = *to_left;
-
 while (*from_left && *to_left) {
 
 ch = *inbufptr++;
-- 
1.8.2.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXfont] Protect config.h inclusion with ifdef HAVE_CONFIG_H, like usual.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 12:03 PM, Thomas Klausner wrote:

---
  src/fontfile/bunzip2.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/fontfile/bunzip2.c b/src/fontfile/bunzip2.c
index 44d19f0..4078796 100644
--- a/src/fontfile/bunzip2.c
+++ b/src/fontfile/bunzip2.c
@@ -26,7 +26,9 @@
   */


+#ifdef HAVE_CONFIG_H
  #include "config.h"
+#endif

  #include 
  #include 



Reviewed-by: Alan Coopersmith 

and pushed to git master:

To ssh://git.freedesktop.org/git/xorg/lib/libXfont
   b8dd42d..c21d25d  master -> master

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXtst] Fix some const issues.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 12:12 PM, Thomas Klausner wrote:

-static const char *xrecord_extension_name = RECORD_NAME;
+static char *xrecord_extension_name = RECORD_NAME;


NAK again, use new libXext headers instead.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXinerama] Const fix.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 01:10 PM, Thomas Klausner wrote:

---
  src/Xinerama.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Xinerama.c b/src/Xinerama.c
index 67a35b5..17e8ec8 100644
--- a/src/Xinerama.c
+++ b/src/Xinerama.c
@@ -51,7 +51,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)

  static XExtensionInfo _panoramiX_ext_info_data;
  static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
-static const char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
+static char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;

  #define PanoramiXCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, panoramiX_extension_name, val)



Nope, you need to build with current libXext headers instead.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXRes] Const fix.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 01:12 PM, Thomas Klausner wrote:

---
  src/XRes.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XRes.c b/src/XRes.c
index 51e905f..aef32ce 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -28,7 +28,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)

  static XExtensionInfo _xres_ext_info_data;
  static XExtensionInfo *xres_ext_info = &_xres_ext_info_data;
-static const char *xres_extension_name = XRES_NAME;
+static char *xres_extension_name = XRES_NAME;

  #define XResCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, xres_extension_name, val)



NAK, same as previous patches in this vein.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXxf86vm] Const fix.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 01:13 PM, Thomas Klausner wrote:

---
  src/XF86VMode.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/XF86VMode.c b/src/XF86VMode.c
index fb94816..5cd8020 100644
--- a/src/XF86VMode.c
+++ b/src/XF86VMode.c
@@ -62,7 +62,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned long 
n)

  static XExtensionInfo _xf86vidmode_info_data;
  static XExtensionInfo *xf86vidmode_info = &_xf86vidmode_info_data;
-static const char *xf86vidmode_extension_name = XF86VIDMODENAME;
+static char *xf86vidmode_extension_name = XF86VIDMODENAME;

  #define XF86VidModeCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, xf86vidmode_extension_name, val)



NAK.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXxf86vm] Const fix.

2013-06-02 Thread Thomas Klausner
On Sun, Jun 02, 2013 at 04:32:13PM -0700, Alan Coopersmith wrote:
> On 06/ 2/13 01:13 PM, Thomas Klausner wrote:
> >---
> >  src/XF86VMode.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/XF86VMode.c b/src/XF86VMode.c
> >index fb94816..5cd8020 100644
> >--- a/src/XF86VMode.c
> >+++ b/src/XF86VMode.c
> >@@ -62,7 +62,7 @@ static inline void _XEatDataWords(Display *dpy, unsigned 
> >long n)
> >
> >  static XExtensionInfo _xf86vidmode_info_data;
> >  static XExtensionInfo *xf86vidmode_info = &_xf86vidmode_info_data;
> >-static const char *xf86vidmode_extension_name = XF86VIDMODENAME;
> >+static char *xf86vidmode_extension_name = XF86VIDMODENAME;
> >
> >  #define XF86VidModeCheckExtension(dpy,i,val) \
> >XextCheckExtension (dpy, i, xf86vidmode_extension_name, val)
> >
> 
> NAK.

(this one and the others you NAKed):

I guess the problem is that the libXext code is still 1.2.0.

Ignore them for now, I'll get back to you with these if they are still
there with 1.3.2.

Sorry for the noise here,
 Thomas
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:xrandr 2/2] Use __UNCONST to work around const problem.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 12:30 PM, Thomas Klausner wrote:

XXX: should probably be fixed differently.
---
  xrandr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xrandr.c b/xrandr.c
index da786cb..0b285a3 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -1524,7 +1524,7 @@ crtc_set_transform (crtc_t *crtc, transform_t *transform)
  if (major > 1 || (major == 1 && minor >= 3))
XRRSetCrtcTransform (dpy, crtc->crtc.xid,
 &transform->transform,
-transform->filter,
+__UNCONST(transform->filter),
 transform->params,
 transform->nparams);
  }



Sorry, breaks the build since __UNCONST is not defined.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:xrandr 1/2] Protect config.h like usual.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 12:30 PM, Thomas Klausner wrote:

---
  xrandr.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/xrandr.c b/xrandr.c
index 94e5c2e..da786cb 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -41,7 +41,9 @@
  #include 
  #include 

+#ifdef HAVE_CONFIG_H
  #include "config.h"
+#endif

  static char   *program_name;
  static Display*dpy;



Reviewed-by: Alan Coopersmith 

and pushed to git master:

To ssh://git.freedesktop.org/git/xorg/app/xrandr
   ace5e2b..bd1502f  master -> master

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:xrandr 2/2] Use __UNCONST to work around const problem.

2013-06-02 Thread Thomas Klausner
On Sun, Jun 02, 2013 at 04:35:51PM -0700, Alan Coopersmith wrote:
> On 06/ 2/13 12:30 PM, Thomas Klausner wrote:
> >XXX: should probably be fixed differently.
> >---
> >  xrandr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/xrandr.c b/xrandr.c
> >index da786cb..0b285a3 100644
> >--- a/xrandr.c
> >+++ b/xrandr.c
> >@@ -1524,7 +1524,7 @@ crtc_set_transform (crtc_t *crtc, transform_t 
> >*transform)
> >  if (major > 1 || (major == 1 && minor >= 3))
> > XRRSetCrtcTransform (dpy, crtc->crtc.xid,
> >  &transform->transform,
> >- transform->filter,
> >+ __UNCONST(transform->filter),
> >  transform->params,
> >  transform->nparams);
> >  }
> >
> 
> Sorry, breaks the build since __UNCONST is not defined.

Yeah, needs the bits
#ifndef __UNCONST
#define __UNCONST(x) (x)
#endif
like the other patch.

Better would be if we wouldn't need the unconst cast though :)
 Thomas
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:libXt] Add missing comma to fix DEBUG build.

2013-06-02 Thread Alan Coopersmith

On 06/ 2/13 12:48 PM, Thomas Klausner wrote:

---
  src/ResConfig.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ResConfig.c b/src/ResConfig.c
index 161366a..152d9cf 100644
--- a/src/ResConfig.c
+++ b/src/ResConfig.c
@@ -981,7 +981,7 @@ _XtResourceConfigurationEH (
resource = XtNewString (data_ptr);
value = XtNewString (data_value);
  #ifdef DEBUG
-   fprintf (stderr, "resource_len=%d\n"
+   fprintf (stderr, "resource_len=%d\n",
 resource_len);
fprintf (stderr, "resource = %s\t value = %s\n",
 resource, value);



Reviewed-by: Alan Coopersmith 

and pushed to git master:
To ssh://git.freedesktop.org/git/xorg/lib/libXt
   e83d6d6..02fd80a  master -> master


--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[xf86-video-mach64] crash on sparc64 w/ xserver 1.14.1

2013-06-02 Thread Matthieu Herrb
Hi,

trying to run firefox under OpenBSD/sparc64 with X server 1.14.1 on a
Sun Blade 1000 crashes xf86-video-mach64 6.9.4: 

Program received signal SIGSEGV, Segmentation fault.
0x0008b5a158f0 in Mach64CheckTexture (pPict=0x8b3c41600)
at atimach64render.c:342
342 int w = pPict->pDrawable->width;
(gdb) bt
#0  0x0008b5a158f0 in Mach64CheckTexture (pPict=0x8b3c41600)
at atimach64render.c:342
#1  0x0008b5a15b14 in Mach64CheckComposite (op=3,
pSrcPicture=0x8b3c41600,
pMaskPicture=0x8b3c41a80, pDstPicture=0x8b3c41580) at
atimach64render.c:385
#2  0x0008bebb5338 in exaTryDriverComposite ()
   from /usr/X11R6/lib/modules/libexa.so
#3  0x0008bebb5bb0 in exaComposite () from
/usr/X11R6/lib/modules/libexa.so
#4  0x0006b2579134 in damageComposite () from /usr/X11R6/bin/Xorg
#5  0x0006b256a50c in CompositePicture () from /usr/X11R6/bin/Xorg
#6  0x0008bebb4eac in exaTrapezoids ()
   from /usr/X11R6/lib/modules/libexa.so
#7  0x0006b256a10c in CompositeTrapezoids () from
/usr/X11R6/bin/Xorg
#8  0x0006b256fb30 in ProcRenderTrapezoids () from
/usr/X11R6/bin/Xorg
#9  0x0006b256bbc4 in ProcRenderDispatch () from
/usr/X11R6/bin/Xorg
#10 0x0006b2478df0 in Dispatch () from /usr/X11R6/bin/Xorg
#11 0x0006b2465c58 in main () from /usr/X11R6/bin/Xorg
(gdb) up
#1  0x0008b5a15b14 in Mach64CheckComposite (op=3,
pSrcPicture=0x8b3c41600,
pMaskPicture=0x8b3c41a80, pDstPicture=0x8b3c41580) at
atimach64render.c:385
385 if (!Mach64CheckTexture(pSrcPicture))
(gdb) p pPict
$2 = 0x8b3c41600
(gdb) p *pPict
$3 = {pDrawable = 0x0, pFormat = 0x0, format = PICT_a8r8g8b8, refcnt =
1,
  id = 6291603, repeat = 0, graphicsExposures = 0, subWindowMode = 0,
  polyEdge = 0, polyMode = 0, freeCompClip = 0, clientClipType = 0,
  componentAlpha = 0, repeatType = 0, filter = 0, stateChanges = 4095,
  unused = 0, pNext = 0x0, alphaMap = 0x0, alphaOrigin = {x = 0, y =
  0},
  clipOrigin = {x = 0, y = 0}, clientClip = 0x0, serialNumber =
  2147483648,
  pCompositeClip = 0x0, devPrivates = 0x0, transform = 0x0,
  pSourcePict = 0x8bfb1ce20, filter_params = 0x0, filter_nparams = 0}
(gdb)

Any clues on how to fix that ?
-- 
Matthieu Herrb
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH:xrandr 2/2] Use __UNCONST to work around const problem.

2013-06-02 Thread Thomas Klausner
On Mon, Jun 03, 2013 at 01:37:31AM +0200, Thomas Klausner wrote:
> On Sun, Jun 02, 2013 at 04:35:51PM -0700, Alan Coopersmith wrote:
> > On 06/ 2/13 12:30 PM, Thomas Klausner wrote:
> > >XXX: should probably be fixed differently.
> > >---
> > >  xrandr.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > >diff --git a/xrandr.c b/xrandr.c
> > >index da786cb..0b285a3 100644
> > >--- a/xrandr.c
> > >+++ b/xrandr.c
> > >@@ -1524,7 +1524,7 @@ crtc_set_transform (crtc_t *crtc, transform_t 
> > >*transform)
> > >  if (major > 1 || (major == 1 && minor >= 3))
> > >   XRRSetCrtcTransform (dpy, crtc->crtc.xid,
> > >&transform->transform,
> > >-   transform->filter,
> > >+   __UNCONST(transform->filter),
> > >transform->params,
> > >transform->nparams);
> > >  }
> > >
> > 
> > Sorry, breaks the build since __UNCONST is not defined.
> 
> Yeah, needs the bits
> #ifndef __UNCONST
> #define __UNCONST(x) (x)
> #endif
> like the other patch.

Sorry about that. A bit more helpful answer: the __UNCONST(x) that
NetBSD uses is in /usr/include/sys/cdefs.h
   #define __UNCONST(a)   ((void *)(unsigned long)(const void *)(a))

Do you want a patch for the two __UNCONST uses that has that fallback
define (perhaps __XORG_UNCONST to avoid clashes), or is there a good
common place to put it?

> Better would be if we wouldn't need the unconst cast though :)

That's still true :)
 Thomas
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel