Re: Need a reference to X protocol documentation for shapemask in transparent xpm

2013-10-29 Thread Peter Harris
On 2013-10-29 04:27, Michael Enke wrote:
 Hello Alan,
 thank you for your comment.
 I was playing with XServer for Android and created a patch to support
 transparency
 using the core protocol. Now the maintainer (and me too), before adding
 that patch,
 would like to know where to find this in the documentation.
 Searching the x11protocol.pdf for transparent matched one place which
 is not related to
 transparency.
 Any hint?

http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:CreateGC

Search for clip-mask.

Peter Harris
-- 
   Open Text Connectivity Solutions Group
Peter Harrishttp://connectivity.opentext.com/
Research and DevelopmentPhone: +1 905 762 6001
phar...@opentext.comToll Free: 1 877 359 4866
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: xorg Digest, Vol 99, Issue 29

2013-10-29 Thread Tony


在我的摩托罗拉手机发送

xorg-requ...@lists.x.org编写:

Send xorg mailing list submissions to
   xorg@lists.x.org

To subscribe or unsubscribe via the World Wide Web, visit
   http://lists.x.org/mailman/listinfo/xorg
or, via email, send a message with subject or body 'help' to
   xorg-requ...@lists.x.org

You can reach the person managing the list at
   xorg-ow...@lists.x.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of xorg digest...


Today's Topics:

   1. [ANNOUNCE] xorg-server 1.14.3.901 (Matt Dew)
   2. SIGUSR1 to xinit (k...@hot.ee)
   3. bug report (Jean-Gael Renard)
   4. add (Jean-Gael Renard)
   5. Re: SIGUSR1 to xinit (Alan Coopersmith)


--

Message: 1
Date: Sat, 26 Oct 2013 14:17:50 -0600
From: Matt Dew mar...@osource.org
To: xorg-annou...@lists.freedesktop.org
Cc: x...@lists.freedesktop.org
Subject: [ANNOUNCE] xorg-server 1.14.3.901
Message-ID: 526c236e.8050...@osource.org
Content-Type: text/plain; charset=ISO-8859-1

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,
  Here's 1.14.4-rc1.   Please beat on it.

Major highlight:
  CVE-2013-4396 -
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4396


I pulled and cherry-picked these late in the 6-week cycle.

Considering that the CVE-2013-4396 is in here, I'm extending this
another week.  I want to get this out for the security patch, but I
want a little testing on it. So, if there are no issues between now
and next Thursday, I will release it then.


Alan Coopersmith (2):
  Avoid use-after-free in dix/dixfonts.c: doImageText()
[CVE-2013-4396]
  Allow disabling XFree86-DGA, DRI, VidModeExtension extensions

Egbert Eich (1):
  DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow()

Julien Cristau (3):
  test: include dix-config.h in hashtabletest.c
  xfree86: improve check for posix saved ids
  dix: add missing include for DeleteWindowFromAnySelections

Matt Dew (1):
  Bump version from 1.14.3 to 1.14.3.901.

Peter Hutterer (14):
  test: fix the gcc diagnostics pragma
  dix: check for grab type before checking XI2 mask
  Xi: allow for XIAllowEvent requests larger than XI  2.2 size
(#68554)
  dix: only allow button and key events to freeze a sync'd pointer
  include: change grabtypes to start at 1
  dix: don't attempt to deliver an event for a different grabtype
  dix: only deliver for the current grab type
  sync: compress two if statements
  sync: always call BracketValues when recalculating upper/lower
brackets
  sync: supply the counter from IdleTimeBlockHandler
  dix: provide accessor methods for the last device event time
  sync: if the idle time was reset, force alarms to trigger (#70476)
  sync: always set the brackets (#59644)
  sync: split updating and triggering a counter up

git tag: xorg-server-1.14.3.901

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.14.3.901.tar.bz2
MD5:  8b59f9964103706f7b1bf4ba8395f91b  xorg-server-1.14.3.901.tar.bz2
SHA1: b253807d4f3110e8297859d7a94a2820e277ef9d
xorg-server-1.14.3.901.tar.bz2
SHA256:
3d8481f60d6ef67bb9b72c1ee375f5a64e69ba32c613c01367b3c2b5c154ab0a
xorg-server-1.14.3.901.tar.bz2

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.14.3.901.tar.gz
MD5:  af10685c61957b3fd10fd32a7eed0af3  xorg-server-1.14.3.901.tar.gz
SHA1: a0a9f60f465fdb536e885b293e3cb4f6f93533fe
xorg-server-1.14.3.901.tar.gz
SHA256:
6339d38d314435a8d6d0926aeef939b8e74c8f167890870d7bb585f37bd90cd4
xorg-server-1.14.3.901.tar.gz



- -- 
Matt Dew mar...@osource.org   Key signature: 0xF7C3 BEC3
Fingerprint: FDB1 9D94 C573 DC29 BCCB 2F9F A6BF 3771 F7C3 BEC3
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSbCNrAAoJEKa/N3H3w77DnM4H/0ALx+Qft5Nf+H7/c96DONn/
Fqjf9HUy1TAqsQr1u5deLxDYgl60RBUB0Yq6UA+u1v/XhavRLJBM6Zvvyd+2Dc8n
rqwNuNfIztPsh+j4L/G+zbsP7odoH875Wj0du/+5OvcwL4G7ImwChPqZo0MG0L0K
YF4/uhqrkksFjFwQhZhayf7R5mJpP8gillbtDMj3vrvDHHx33yeymW8Ysfu0TYlt
KxQmoRVrnIYFxHTn1HZQ5i90TpZHVX6Hgar+ra4lSNMp90HTBOpRabTVGO7gbJ4B
uLgt5FrinDpkgHoY7c75JxDOGNJpobBwczNaCGaXemCkZaZiWUBGQjaUFuEoDto=
=Y2pb
-END PGP SIGNATURE-


--

Message: 2
Date: Fri, 25 Oct 2013 18:05:53 +0300
From: k...@hot.ee
To: xorg@lists.x.org
Subject: SIGUSR1 to xinit
Message-ID: 20131025150553.GA4483@KLF.private
Content-Type: text/plain; charset=us-ascii

Hello,

Apparently xserver does not signal the parent if ppid == 1. (Launch from init 
is assumed?)

Excerpt from NotifyParentProcess() in ./os/connection.c:
if (RunFromSmartParent) {
if (ParentProcess  1) {
kill(ParentProcess, SIGUSR1);
}
}

This means startup is slow (a timeout) if xinit happens to be pid 1.
On linux, this is the case when xinit is launched into a new PID namespace.
Other than that, xinit 

Choosing fonts and sizes

2013-10-29 Thread Steven Feil
I am having a difficulty, after reinstalling my Gentoo/Linux/Gnu
system. I can no longer get XEmacs to use a font small enough to show
110 columns on the monitor I have.  For me, this feature is a must.

I still have a working old system, where the font is the right size
and a new system where the font is too large for my needs. So I could
compare the setup between to two to see what the difference
is. Perhaps, I just failed to install the right font when I moved to
the new system. Or it could be caused by a setting generated by the
install script that was different than the previous install.  My
problem is, I don't know were to begin in figuring what fonts are
being utilized by either the new system or the old one.

I have also noticed that the problem is based on the computer it is
being displayed on and not the computer that XEmacs is being run
on. If I run XEmacs on the new computer I get the wrong font when
displaying it on the new computer. However If I run XEmacs on the new
computer but export the display to the old computer, I see it in the
right font. If I export the display the other way around where it is
displaying on the new computer, I get the wrong font again.

There are no errors in /var/log/Xorg.0.log file to tell me what is
going on.  I would appreciate any help such as what can I could use to
collect debugging information.

PS: According to /var/log/Xorg.0.log I am using X.Org X Server 1.14.3
Release Date: 2013-09-12


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s


Re: Choosing fonts and sizes

2013-10-29 Thread Glynn Clements

Steven Feil wrote:

 I have also noticed that the problem is based on the computer it is
 being displayed on and not the computer that XEmacs is being run
 on. If I run XEmacs on the new computer I get the wrong font when
 displaying it on the new computer. However If I run XEmacs on the new
 computer but export the display to the old computer, I see it in the
 right font. If I export the display the other way around where it is
 displaying on the new computer, I get the wrong font again.

My guess is that the font size is specified in points, and the
displays have different physical resolutions (dpi), resulting in
different font sizes in pixels.

If that's the case, you can either specify the font size in pixels (at
least, you can if you use X resources; I don't know about the
customize interface), or force the new display to the same dpi as the
old one via the -dpi option.

-- 
Glynn Clements gl...@gclements.plus.com
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s


Patch shadowfb refresh damaged region

2013-10-29 Thread Kasberger Andreas
Hello

Working with virtualbox I came to some situation were the shadowfb were not 
updated correctly in all cases.
Simply some routines are missing in shadowfb but done in xdamage part.
So I just done this for shadowfb too

Best regards
   Andreas


mailto:kasber...@heidenhain.de
tel.: +49 8669 31 2690


DR. JOHANNES HEIDENHAIN GmbH
Dr.-Johannes-Heidenhain-Str. 5
83301 Traunreut, Deutschland
http://www.heidenhain.de/


--
Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: 
Traunreut
Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard
Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / 
Chairman),
Michael Grimm, Matthias Fauser, Sebastian Tondorf

E-Mail Haftungsausschluss / E-Mail Disclaimer: 
http://www.heidenhain.de/disclaimer


0001-damaged-for-the-shadowfb-will-be-now-done-completely.patch
Description: 0001-damaged-for-the-shadowfb-will-be-now-done-completely.patch
___
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 1/2] Staticise output names

2013-10-29 Thread Thierry Reding
This array isn't used anywhere outside this file, so it can be made
static.

Signed-off-by: Thierry Reding tred...@nvidia.com
---
 src/drmmode_display.c | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 4fb4d21..8591e18 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -962,22 +962,22 @@ static int subpixel_conv_table[7] = { 0, SubPixelUnknown,
  SubPixelVerticalBGR,
  SubPixelNone };
 
-const char *output_names[] = { None,
-  VGA,
-  DVI,
-  DVI,
-  DVI,
-  Composite,
-  S-video,
-  LVDS,
-  CTV,
-  DIN,
-  DisplayPort,
-  HDMI,
-  HDMI,
-  TV,
-  eDP,
-  Virtual
+static const char *output_names[] = { None,
+ VGA,
+ DVI,
+ DVI,
+ DVI,
+ Composite,
+ S-video,
+ LVDS,
+ CTV,
+ DIN,
+ DisplayPort,
+ HDMI,
+ HDMI,
+ TV,
+ eDP,
+ Virtual,
 };
 
 static void
-- 
1.8.4

___
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 2/2] Properly identify DSI outputs

2013-10-29 Thread Thierry Reding
Newer Linux kernels support DSI outputs. To be able to identify them
properly, add DSI to the list of output names.

Signed-off-by: Thierry Reding tred...@nvidia.com
---
 src/drmmode_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8591e18..611a612 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -978,6 +978,7 @@ static const char *output_names[] = { None,
  TV,
  eDP,
  Virtual,
+ DSI,
 };
 
 static void
-- 
1.8.4

___
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: [RFC] X.Org minimum requirements for Autotools policy review

2013-10-29 Thread Gaetan Nadon
On 13-10-24 02:17 PM, Gaetan Nadon wrote:
 Recommendations

  1. We should prereq libtool 2.2 as a minimum (available since 2008).
  2. We should prereq autoconf 2.62 as a minimum (available since
 2008). Keeps us in the same time period and is required by
 automake 1.11.
  3. We should prereq automake 1.11 (available since 2009). Keeps us in
 the same time period. 

 If the policy is changed, the wiki will be updated.

Let's get started with libtool. No one is objecting to libtool 2.2. It's
been in use for several years.

This will allow fixing some warnings and prevent some errors like having
both AC_PROG_LIBTOOL and LT_INIT statements. It will prevent developers
from wasting time tripping on obsolete code.

The X.Org Modular Tree Developer's Guide:

http://www.x.org/wiki/ModularDevelopersGuide/#index2h3



___
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

[PULL] GLX rewrite

2013-10-29 Thread Adam Jackson
Cosmetic fixes to the dispatch rewrite itself and to the DRI1 AIGLX
removal, otherwise this all matches what's been sent before.  Notably
omitted here is the removal of the glx context cache, which I think
wants to be redone after glamor is merged.

The following changes since commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893:

  glx: Add support for the new DRI loader entrypoint. (2013-10-23 08:12:28 
+0800)

are available in the git repository at:

  ssh://people.freedesktop.org/~ajax/xserver.git glx-rewrite

for you to fetch changes up to 551a32a6f90eab2fef65da4fa65c51f280af136e:

  glx: convert to direct GL dispatch (v2) (2013-10-29 10:30:43 -0400)


Adam Jackson (6):
  glx: Only take a Pixmap reference if creating the GLXPixmap succeeded
  glx: Fix memory leak in context garbage collection (v2)
  glx: Fix a corner case in DrawableGone
  glx: Simplify glXDestroyContext
  glx: Remove DRI1 AIGLX (v2)
  glx: convert to direct GL dispatch (v2)

 configure.ac   | 6 +-
 glx/Makefile.am|18 +-
 glx/createcontext.c| 2 +-
 glx/dispatch.h | 19816 ---
 glx/glapi.c|   504 -
 glx/glapi.h|   135 -
 glx/glapi_gentable.c   | 10058 --
 glx/glapitable.h   |  1016 --
 glx/glprocs.h  |  3534 ---
 glx/glthread.h |   234 -
 glx/glxcmds.c  |33 +-
 glx/glxcmdsswap.c  | 4 -
 glx/glxcontext.h   |10 +-
 glx/glxdri.c   |  1172 ---
 glx/glxdri2.c  | 4 -
 glx/glxdriswrast.c | 4 -
 glx/glxext.c   |46 +-
 glx/glxserver.h| 5 +
 glx/glxstubs.c |50 +
 glx/indirect_dispatch.c|  3236 ++
 glx/indirect_dispatch.h|   602 +-
 glx/indirect_dispatch_swap.c   |  4016 +++
 glx/indirect_program.c |49 +-
 glx/indirect_reqsize.c |77 +-
 glx/indirect_reqsize.h |47 +-
 glx/indirect_size.h|12 +-
 glx/indirect_size_get.c|   204 +-
 glx/indirect_size_get.h|16 +-
 glx/indirect_table.c   |   468 +-
 glx/indirect_texture_compression.c |27 +-
 glx/indirect_util.c| 7 +-
 glx/render2.c  |69 +-
 glx/render2swap.c  |69 +-
 glx/renderpix.c|26 +-
 glx/renderpixswap.c|26 +-
 glx/single2.c  |18 +-
 glx/single2swap.c  |16 +-
 glx/singlepix.c|87 +-
 glx/singlepixswap.c|88 +-
 glx/singlesize.c   |10 +-
 glx/swap_interval.c| 4 -
 glx/xfont.c|30 +-
 hw/xfree86/dixmods/glxmodule.c | 3 -
 43 files changed, 3361 insertions(+), 42497 deletions(-)
 delete mode 100644 glx/dispatch.h
 delete mode 100644 glx/glapi.c
 delete mode 100644 glx/glapi.h
 delete mode 100644 glx/glapi_gentable.c
 delete mode 100644 glx/glapitable.h
 delete mode 100644 glx/glprocs.h
 delete mode 100644 glx/glthread.h
 delete mode 100644 glx/glxdri.c
 create mode 100644 glx/glxstubs.c

- ajax

___
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 3/3] damageext: Xineramify (v5)

2013-10-29 Thread Adam Jackson
v5:
- Translate root window coordinates correctly [aaronp]
- Clip window damages to the root geometry [keithp]

Screen 0 holds the real damage for all drawable types; the window
report hooks for other screens look up screen 0 and pile on.  Therefore
we don't need to wrap Subtract, though we do have to be careful how we
subtract since we need to clip to the (apparent) root window geometry.
The real compexity is the cleverness required for deferring writing the
events, but there's no getting around that.

Add is probably (still) somewhat broken since it will only hit screen 0,
but Add really only exists for DRI1's sake, and DRI1 disables itself
with Xinerama enabled anyway.  In the absence of a use case, I'm leaving
it unwrapped under Xinerama; if someone wants to define how it ought to
work, be my guest.

Signed-off-by: Adam Jackson a...@redhat.com
---
 Xext/panoramiX.c |   3 +
 Xext/panoramiX.h |   3 +
 damageext/damageext.c| 367 +--
 damageext/damageextint.h |   4 +
 4 files changed, 332 insertions(+), 45 deletions(-)

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 15c38a9..ce0d072 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -54,6 +54,7 @@ Equipment Corporation.
 #include resource.h
 #include picturestr.h
 #include xfixesint.h
+#include damageextint.h
 #ifdef COMPOSITE
 #include compint.h
 #endif
@@ -582,6 +583,7 @@ PanoramiXExtensionInit(void)
 
 PanoramiXRenderInit();
 PanoramiXFixesInit();
+PanoramiXDamageInit();
 #ifdef COMPOSITE
 PanoramiXCompositeInit();
 #endif
@@ -887,6 +889,7 @@ PanoramiXResetProc(ExtensionEntry * extEntry)
 
 PanoramiXRenderReset();
 PanoramiXFixesReset();
+PanoramiXDamageReset();
 #ifdef COMPOSITE
 PanoramiXCompositeReset ();
 #endif
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h
index 6578dfa..b06fce4 100644
--- a/Xext/panoramiX.h
+++ b/Xext/panoramiX.h
@@ -64,6 +64,9 @@ typedef struct {
 struct {
 Bool root;
 } pict;
+struct {
+Bool queued;
+} damage;
 char raw_data[4];
 } u;
 } PanoramiXRes;
diff --git a/damageext/damageext.c b/damageext/damageext.c
index 9521c26..d1c9699 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2002 Keith Packard
+ * Copyright 2013 Red Hat, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -28,6 +29,15 @@
 #include protocol-versions.h
 #include extinit.h
 
+#ifdef PANORAMIX
+#include panoramiX.h
+#include panoramiXsrv.h
+
+static RESTYPE XRT_DAMAGE;
+static int (*PanoramiXSaveDamageVector[XDamageNumberRequests]) (ClientPtr);
+
+#endif
+
 static unsigned char DamageReqCode;
 static int DamageEventBase;
 static RESTYPE DamageExtType;
@@ -37,25 +47,61 @@ static DevPrivateKeyRec DamageClientPrivateKeyRec;
 #define DamageClientPrivateKey (DamageClientPrivateKeyRec)
 
 static void
+DamageNoteCritical(ClientPtr pClient)
+{
+DamageClientPtr pDamageClient = GetDamageClient(pClient);
+
+/* Composite extension marks clients with manual Subwindows as critical */
+if (pDamageClient-critical  0) {
+SetCriticalOutputPending();
+pClient-smart_priority = SMART_MAX_PRIORITY;
+}
+}
+
+static void
+damageGetGeometry(DrawablePtr draw, int *x, int *y, int *w, int *h)
+{
+#ifdef PANORAMIX
+if (!noPanoramiXExtension  draw-type == DRAWABLE_WINDOW) {
+WindowPtr win = (WindowPtr)draw;
+
+if (!win-parent) {
+*x = screenInfo.x;
+*y = screenInfo.y;
+*w = screenInfo.width;
+*h = screenInfo.height;
+return;
+}
+}
+#endif
+
+*x = draw-x;
+*y = draw-y;
+*w = draw-width;
+*h = draw-height;
+}
+
+static void
 DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
 {
 ClientPtr pClient = pDamageExt-pClient;
-DamageClientPtr pDamageClient = GetDamageClient(pClient);
 DrawablePtr pDrawable = pDamageExt-pDrawable;
 xDamageNotifyEvent ev;
-int i;
+int i, x, y, w, h;
+
+damageGetGeometry(pDrawable, x, y, w, h);
 
 UpdateCurrentTimeIf();
 ev = (xDamageNotifyEvent) {
 .type = DamageEventBase + XDamageNotify,
 .level = pDamageExt-level,
 .drawable = pDamageExt-drawable,
-.damage = pDamageExt-id,
+.damage = pDamageExt-report_id,
 .timestamp = currentTime.milliseconds,
-.geometry.x = pDrawable-x,
-.geometry.y = pDrawable-y,
-.geometry.width = pDrawable-width,
-.geometry.height = pDrawable-height
+.geometry.x = x,
+.geometry.y = y,
+.geometry.width = w,
+.geometry.height = h
 };
 if (pBoxes) {
 for (i = 0; i  nBoxes; i++) {
@@ -72,15 +118,12 @@ DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, 
int nBoxes)
 else {
 

[PATCH 2/3] dix: Add PostDispatchCallback

2013-10-29 Thread Adam Jackson
This is required to Xineramify the Damage extension, since we need to
collect regions across screens.  You can't quite use FlushCallback for
this since WriteEventsToClient can itself trigger FlushCallback and you
recurse.

There are probably other cases where this would be useful though, for
example some of our abuse of BlockHandler may want to move to this
callback.

Signed-off-by: Adam Jackson a...@redhat.com
---
 dix/dispatch.c  | 5 -
 include/dixstruct.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 4fecfea..53cabdf 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -167,6 +167,7 @@ static int nextFreeClientID;/* always MIN free client 
ID */
 static int nClients;/* number of authorized clients */
 
 CallbackListPtr ClientStateCallback;
+CallbackListPtr PostDispatchCallback;
 
 /* dispatchException  isItTimeToYield must be declared volatile since they
  * are modified by signal handlers - otherwise optimizer may assume it doesn't
@@ -428,9 +429,11 @@ Dispatch(void)
 result = BadLength;
 else {
 result = XaceHookDispatch(client, client-majorOp);
-if (result == Success)
+if (result == Success) {
 result =
 (*client-requestVector[client-majorOp]) (client);
+CallCallbacks(PostDispatchCallback, result);
+}
 XaceHookAuditEnd(client, result);
 }
 #ifdef XSERVER_DTRACE
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 7711cde..3fdf6dc 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -39,6 +39,7 @@ SOFTWARE.
  */
 
 extern _X_EXPORT CallbackListPtr ClientStateCallback;
+extern _X_EXPORT CallbackListPtr PostDispatchCallback;
 
 typedef struct {
 ClientPtr client;
-- 
1.8.3.1

___
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


Xorg+logind+DM issue: inactive graphical session for seat0

2013-10-29 Thread Laércio de Sousa
Hello there!

I'm posting this question in both systemd-devel and xorg-devel lists
because I want to know each one's opinion about it.

In some multiseat setups involving multiple video cards, sometimes we get
the following error: depending on the display manager currently used,
systemd-logind gives us an INACTIVE graphical session for seat0.

An interesting analysis of the problem can be found at
https://bugzilla.redhat.com/show_bug.cgi?id=1018196. To summarize, due to
some race condition between seat0 and non-seat0 seats, a non-seat0 X server
can steal the VT expected by seat0 X server. In this case, unless
XDG_VTNR is explicitly defined by display manager, the pam_systemd module
fails to infer the correct VT for seat0 X server (i.e., the one
corresponding to vtXX command line argument), returning XDG_VTNR=0 to
seat0's graphic session, which causes all the trouble.

Joseph Nuzman, who opened the bug above, suggests some approachs to avoid
this problem, and I really want to know what do you think about them:

* DMs should always set the XDG_VTNR variable for seat0. GDM currently
doesn't set this variable, but a forked version of LightDM, maintained by
Ubuntu Multiseat team (merging into upstream is under consideration), does
it.

* pam_systemd should have its heuristic to infer the seat0 VT number
improved. Maybe parsing X server /proc/pid/cmdline for a vtXX argument.

* DMs should ensure that seat0 X server starts before any other one. Stefan
Brüns has provided a similar approach for KDM on Fedora/openSUSE: it
ensures seat0 X server starts at the same VT previously used by Plymouth.

I would append another approach to the list:

* For non-seat0 seats, X server should open no VT at all. Currently, even
with -sharevts option, it seems Xorg does open a VT, although it can't
control this.

CANTATE DOMINO CANTICUM NOVUM
QUIA MIRABILIA FECIT

Laércio
___
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 2/3] xfree86: return NULL for compat output if no outputs.

2013-10-29 Thread Adam Jackson
From: Dave Airlie airl...@redhat.com

With outputless GPUs showing up we crash here if there are not outputs
try and recover with a bit of grace.

Reviewed-by: Adam Jackson a...@redhat.com
Signed-off-by: Dave Airlie airl...@redhat.com
---
 hw/xfree86/modes/xf86Crtc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 35845e8..ca829e8 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1863,6 +1863,9 @@ SetCompatOutput(xf86CrtcConfigPtr config)
 DisplayModePtr maxmode = NULL, testmode, mode;
 int o, compat = -1, count, mincount = 0;
 
+if (config-num_output == 0)
+return NULL;
+
 /* Look for one that's definitely connected */
 for (o = 0; o  config-num_output; o++) {
 test = config-output[o];
-- 
1.8.3.1

___
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 1/3] test: build the touch test only when building Xorg

2013-10-29 Thread Adam Jackson
From: Dan Horák d...@danny.cz

Reviewed-by: Adam Jackson a...@redhat.com
Signed-off-by: Dan Horák d...@danny.cz
---
 test/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index eff0c9d..53004d0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,11 +1,11 @@
 if ENABLE_UNIT_TESTS
 SUBDIRS= .
-noinst_PROGRAMS = list string touch
+noinst_PROGRAMS = list string
 if XORG
 # Tests that require at least some DDX functions in order to fully link
 # For now, requires xf86 ddx, could be adjusted to use another
 SUBDIRS += xi2
-noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os 
signal-logging
+noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os 
signal-logging touch
 endif
 check_LTLIBRARIES = libxservertest.la
 
-- 
1.8.3.1

___
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 3/3] mieq: Bump default queue size to 512

2013-10-29 Thread Adam Jackson
Based on some bugzilla scraping I did around November 2012.  Of xserver
bugs in Red Hat bugzilla with an EQ size message in the log, the
distribution looked like:

String  | Matches
-
Increasing EQ size to 512   | 460
Increasing EQ size to 1024  | 52
Increasing EQ size to 2048  | 6
Increasing EQ size to 4096  | 0

Most of the 512 ones appear to be mostly harmless, some relatively
expensive path in either rendering or resource destruction simply taking
too long due to external pressures like paging or CPU contention.  So
let's raise the initial queue size, both to reduce the number of
spurious abrt reports and to drop fewer events in all but the most
pathological cases.

Signed-off-by: Adam Jackson a...@redhat.com
---
 mi/mieq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index d7d73de..4c07480 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -60,7 +60,7 @@ in this Software without prior written authorization from The 
Open Group.
 #endif
 
 /* Maximum size should be initial size multiplied by a power of 2 */
-#define QUEUE_INITIAL_SIZE 256
+#define QUEUE_INITIAL_SIZE 512
 #define QUEUE_RESERVED_SIZE 64
 #define QUEUE_MAXIMUM_SIZE4096
 #define QUEUE_DROP_BACKTRACE_FREQUENCY 100
-- 
1.8.3.1

___
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 0/3] Fedora patch merge

2013-10-29 Thread Adam Jackson
Just a couple of trivial things we've been carrying in Fedora for a
while that seem upstream-ready.

- ajax

___
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 3/3] mieq: Bump default queue size to 512

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 12:09 PM, Adam Jackson a...@redhat.com wrote:

 Based on some bugzilla scraping I did around November 2012.  Of xserver
 bugs in Red Hat bugzilla with an EQ size message in the log, the
 distribution looked like:

 String  | Matches
 -
 Increasing EQ size to 512   | 460
 Increasing EQ size to 1024  | 52
 Increasing EQ size to 2048  | 6
 Increasing EQ size to 4096  | 0

 Most of the 512 ones appear to be mostly harmless, some relatively
 expensive path in either rendering or resource destruction simply taking
 too long due to external pressures like paging or CPU contention.  So
 let's raise the initial queue size, both to reduce the number of
 spurious abrt reports and to drop fewer events in all but the most
 pathological cases.

 Signed-off-by: Adam Jackson a...@redhat.com
 ---
  mi/mieq.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/mi/mieq.c b/mi/mieq.c
 index d7d73de..4c07480 100644
 --- a/mi/mieq.c
 +++ b/mi/mieq.c
 @@ -60,7 +60,7 @@ in this Software without prior written authorization
 from The Open Group.
  #endif

  /* Maximum size should be initial size multiplied by a power of 2 */
 -#define QUEUE_INITIAL_SIZE 256
 +#define QUEUE_INITIAL_SIZE 512
  #define QUEUE_RESERVED_SIZE 64
  #define QUEUE_MAXIMUM_SIZE4096
  #define QUEUE_DROP_BACKTRACE_FREQUENCY 100
 --
 1.8.3.1

 ___
 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




-- 
  Jasper
___
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: [PULL] GLX rewrite

2013-10-29 Thread Keith Packard
Adam Jackson a...@redhat.com writes:

 Adam Jackson (6):
   glx: Only take a Pixmap reference if creating the GLXPixmap succeeded
   glx: Fix memory leak in context garbage collection (v2)
   glx: Fix a corner case in DrawableGone
   glx: Simplify glXDestroyContext
   glx: Remove DRI1 AIGLX (v2)
   glx: convert to direct GL dispatch (v2)

Merged.
   7ecfab4..be66809  master - master

-- 
keith.pack...@intel.com


pgpzn5Y7PKqw5.pgp
Description: PGP signature
___
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: [PULL] Enable GLX_ARB_fbconfig_float for DRI2 drivers

2013-10-29 Thread Keith Packard
Ian Romanick i...@freedesktop.org writes:

 Daniel Czarnowski (4):
   glx: Allow float renderType in glXCreateContextAttribsARB
   glx: Correctly set render type enum
   glx: Handle float config types in glxConvertConfigs
   glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers

Merged.
   be66809..b32a4c9  master - master

-- 
keith.pack...@intel.com


pgpN3QGrjrq6x.pgp
Description: PGP signature
___
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 RESEND] xfree86: Find primary entity when bus types are nominally different

2013-10-29 Thread Keith Packard
Connor Behan connor.be...@gmail.com writes:

 As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as
 their primary bus type. However, drivers not implementing a
 platformProbe function will still create entities of type BUS_PCI. We
 need to account for this when checking for the primary entity.

Merged.
   b32a4c9..04ab07c  master - master

-- 
keith.pack...@intel.com


pgpTSvZh6X0iI.pgp
Description: PGP signature
___
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 v2] dmx: queue button events with a flags of 0

2013-10-29 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes:

 Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set
 the flags to 0 so we don't generate any motion on a button event.

Reviewed-by: Keith Packard kei...@keithp.com

I'll wait for this to appear in an input pull unless you want me to
merge it directly, ok?

-- 
keith.pack...@intel.com


pgpJ2kwndC7oj.pgp
Description: PGP signature
___
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: Fix XInput QueryVersion tests and X server code

2013-10-29 Thread Keith Packard
Keith Packard kei...@keithp.com writes:

 [PATCH 1/2] test/xi2: Check new XInput 2.2 and newer QueryVersion

 The XInput QueryVersion tests need to be updated to handle the new
 semantics provided in the post-2.2 world.

 [PATCH 2/2] Xi: Limit the reported Xi version to what the server

 The X server needs to be fixed to never return a version greater than
 what it supports.

Peter -- I'd like to get an ack'd by or review on this if I can?

-- 
keith.pack...@intel.com


pgpPJOKFtsCmT.pgp
Description: PGP signature
___
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] xfree86: Bump video/input/extension ABIs for 1.15

2013-10-29 Thread Julien Cristau
On Tue, Oct 29, 2013 at 12:58:14 -0400, Adam Jackson wrote:

 Signed-off-by: Adam Jackson a...@redhat.com
 ---
  hw/xfree86/common/xf86Module.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
Reviewed-by: Julien Cristau jcris...@debian.org

Cheers,
Julien
___
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: [systemd-devel] Xorg+logind+DM issue: inactive graphical session for seat0

2013-10-29 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Oct 29, 2013 at 01:44:49PM -0200, Laércio de Sousa wrote:
 Joseph Nuzman, who opened the bug above, suggests some approachs to avoid
 this problem, and I really want to know what do you think about them:
 
 * DMs should always set the XDG_VTNR variable for seat0. GDM currently
 doesn't set this variable, but a forked version of LightDM, maintained by
 Ubuntu Multiseat team (merging into upstream is under consideration), does
 it.
If I understand the analysis, *two* different X instances would share the
same VT. This might work, but option 4 seems superior.

 * pam_systemd should have its heuristic to infer the seat0 VT number
 improved. Maybe parsing X server /proc/pid/cmdline for a vtXX argument.
This looks ugly.

 * DMs should ensure that seat0 X server starts before any other one. Stefan
 Brüns has provided a similar approach for KDM on Fedora/openSUSE: it
 ensures seat0 X server starts at the same VT previously used by Plymouth.
This looks racy — let's say that at some point two users on two seats kill
their X's. It's impossible to order such events.

 I would append another approach to the list:
 
 * For non-seat0 seats, X server should open no VT at all. Currently, even
 with -sharevts option, it seems Xorg does open a VT, although it can't
 control this.
Right, so why not do this?

Zbyszek
___
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: any xserver stable branch nominations?

2013-10-29 Thread Tormod Volden
On Tue, Oct 22, 2013 at 4:51 AM, Matt Dew wrote:
 Hi Tormod,
   I only take cherry-picks or pulls.  Not individual patches.

 Keith,
   Thoughts on applying that to master?

 Matt


 On 10/18/2013 05:05 PM, Tormod Volden wrote:
 Please consider Connor's patch (resent yesterday, Message-Id:
 1382059588-620-1-git-send-email-connor.be...@gmail.com,
 http://lists.x.org/archives/xorg-devel/2013-October/038232.html).

Hi Matt,

Now that Keith has applied this in master, can you please consider it
for the point release? It is a regression fix that would make (at
least) the r128 driver work again, so it would be nice to have this
float into distribution updates.

http://cgit.freedesktop.org/xorg/xserver/commit/?id=04ab07ca19236d6c9a947e065fb69b0dd0d16639

Regards,
Tormod
___
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


[PULL 1.14] Bump version of XQuartz bundle

2013-10-29 Thread Jeremy Huddleston Sequoia
The following changes since commit ca11bdc890f14fbe2ab4c32fb7a36ae50672b81a:

  Bump version from 1.14.3 to 1.14.3.901. (2013-10-26 13:51:05 -0600)

are available in the git repository at:

  git://people.freedesktop.org/~jeremyhu/xserver server-1.14-branch

for you to fetch changes up to a95cab9ec53705f838aa23f067c567b5674f242a:

  XQuartz: Bump bundle version to 2.7.5 (2013-10-29 11:06:55 -0700)


Jeremy Huddleston Sequoia (1):
  XQuartz: Bump bundle version to 2.7.5

 hw/xquartz/bundle/Info.plist.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



smime.p7s
Description: S/MIME cryptographic signature
___
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: [RFC] X.Org minimum requirements for Autotools policy review

2013-10-29 Thread Peter Hutterer
On Tue, Oct 29, 2013 at 09:16:53AM -0400, Gaetan Nadon wrote:
 On 13-10-24 02:17 PM, Gaetan Nadon wrote:
  Recommendations
 
   1. We should prereq libtool 2.2 as a minimum (available since 2008).
   2. We should prereq autoconf 2.62 as a minimum (available since
  2008). Keeps us in the same time period and is required by
  automake 1.11.
   3. We should prereq automake 1.11 (available since 2009). Keeps us in
  the same time period. 
 
  If the policy is changed, the wiki will be updated.
 
 Let's get started with libtool. No one is objecting to libtool 2.2. It's
 been in use for several years.
 
 This will allow fixing some warnings and prevent some errors like having
 both AC_PROG_LIBTOOL and LT_INIT statements. It will prevent developers
 from wasting time tripping on obsolete code.
 
 The X.Org Modular Tree Developer's Guide:
 
 http://www.x.org/wiki/ModularDevelopersGuide/#index2h3

while I see this link: it would be a good idea to rename this page to a
generic how to build. These days, modular tree isn't as obvious anymore
since we haven't had the monolithic tree for 7-or-so years.

Cheers,
   Peter
___
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: Fix XInput QueryVersion tests and X server code

2013-10-29 Thread Peter Hutterer
On Tue, Oct 29, 2013 at 10:03:55AM -0700, Keith Packard wrote:
 Keith Packard kei...@keithp.com writes:
 
  [PATCH 1/2] test/xi2: Check new XInput 2.2 and newer QueryVersion
 
  The XInput QueryVersion tests need to be updated to handle the new
  semantics provided in the post-2.2 world.

wasn't this one already fixed in b6e5c4669e0db391966deb397e8c975ec7f0124d?

side-note: it'd be better to use version_compare() from misc.h than the
*1000 approach anyway.

 
  [PATCH 2/2] Xi: Limit the reported Xi version to what the server
 
  The X server needs to be fixed to never return a version greater than
  what it supports.
 
 Peter -- I'd like to get an ack'd by or review on this if I can?

500e844a24962c9e70abb3d614f1973013b2de73, seems to be the same diff.
 
Cheers,
   Peter

___
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


[PULL] dmx cursor jump, missing motion events, kdrive crasher

2013-10-29 Thread Peter Hutterer
.. and Gaetan's AC_CONFIG_FILES patch

The following changes since commit f8662a133690773692dfa392ecfa3b8b56af8fa9:

  Merge branch 'xsync-transition-bug-59644' into for-keith (2013-10-18 16:50:12 
+1000)

are available in the git repository at:


  git://people.freedesktop.org/~whot/xserver for-keith

for you to fetch changes up to 9f4afe7e835cf9c513387ae01eaf8b7a6ba4aac9:

  config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES (2013-10-30 
07:41:26 +1000)


Gaetan Nadon (1):
  config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES

Peter Hutterer (2):
  Xi: fix logic error when calculating emulated motion events
  dmx: queue button events with a flags of 0

Strake (1):
  unbreak KdEnableInput

 Xi/exevents.c|  2 +-
 configure.ac |  3 ++-
 hw/dmx/input/dmxevents.c |  3 +--
 hw/kdrive/src/kinput.c   | 11 ++-
 4 files changed, 10 insertions(+), 9 deletions(-)


pgpa_guVezL2h.pgp
Description: PGP signature
___
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 3/5] Revert os: use libunwind to generate backtraces

2013-10-29 Thread Peter Hutterer
our backtraces are local only, so libunwind is not needed. We can use elfutils
for that instead.

This reverts commit e21e183059df5975e7086850d1931edb2c1bbd06.
---
 configure.ac|  9 +-
 include/dix-config.h.in |  3 --
 os/Makefile.am  |  5 
 os/backtrace.c  | 75 -
 4 files changed, 1 insertion(+), 91 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5cd8b25..d36aefc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,13 +308,6 @@ AC_CHECK_HEADER([execinfo.h],[
 ])]
 )
 
-PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], 
[HAVE_LIBUNWIND=no])
-if test x$HAVE_LIBUNWIND = xyes; then
-   AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
-fi
-AM_CONDITIONAL(HAVE_LIBUNWIND, [test x$HAVE_LIBUNWIND = xyes])
-
-
 dnl ---
 dnl Bus options and CPU capabilities.  Replaces logic in
 dnl hw/xfree86/os-support/bus/Makefile.am, among others.
@@ -1346,7 +1339,7 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
 
 if test x$SPECIAL_DTRACE_OBJECTS = xyes ; then
   DIX_LIB='$(top_builddir)/dix/dix.O'
-  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) 
$(LIBUNWIND_LIBS)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
   OS_LIB='$(top_builddir)/os/libos.la'
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index a643dfc..e1cb9eb 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -60,9 +60,6 @@
 /* Has backtrace support */
 #undef HAVE_BACKTRACE
 
-/* Has libunwind support */
-#undef HAVE_LIBUNWIND
-
 /* Define to 1 if you have the byteswap.h header file. */
 #undef HAVE_BYTESWAP_H
 
diff --git a/os/Makefile.am b/os/Makefile.am
index 364b6da..8891485 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -34,11 +34,6 @@ if XDMCP
 libos_la_SOURCES += $(XDMCP_SRCS)
 endif
 
-if HAVE_LIBUNWIND
-AM_CFLAGS += $(LIBUNWIND_CFLAGS)
-libos_la_LIBADD += $(LIBUNWIND_LIBS)
-endif
-
 EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
 
 if SPECIAL_DTRACE_OBJECTS
diff --git a/os/backtrace.c b/os/backtrace.c
index 3d1195b..c807bd2 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -30,80 +30,6 @@
 #include errno.h
 #include string.h
 
-#ifdef HAVE_LIBUNWIND
-
-#define UNW_LOCAL_ONLY
-#include libunwind.h
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include dlfcn.h
-
-void
-xorg_backtrace(void)
-{
-unw_cursor_t cursor;
-unw_context_t context;
-unw_word_t off;
-unw_proc_info_t pip;
-int ret, i = 0;
-char procname[256];
-const char *filename;
-Dl_info dlinfo;
-
-pip.unwind_info = NULL;
-ret = unw_getcontext(context);
-if (ret) {
-ErrorFSigSafe(unw_getcontext failed: %s [%d]\n, unw_strerror(ret),
-ret);
-return;
-}
-
-ret = unw_init_local(cursor, context);
-if (ret) {
-ErrorFSigSafe(unw_init_local failed: %s [%d]\n, unw_strerror(ret),
-ret);
-return;
-}
-
-ErrorFSigSafe(\n);
-ErrorFSigSafe(Backtrace:\n);
-ret = unw_step(cursor);
-while (ret  0) {
-ret = unw_get_proc_info(cursor, pip);
-if (ret) {
-ErrorFSigSafe(unw_get_proc_info failed: %s [%d]\n,
-unw_strerror(ret), ret);
-break;
-}
-
-ret = unw_get_proc_name(cursor, procname, 256, off);
-if (ret  ret != -UNW_ENOMEM) {
-if (ret != -UNW_EUNSPEC)
-ErrorFSigSafe(unw_get_proc_name failed: %s [%d]\n,
-unw_strerror(ret), ret);
-procname[0] = '?';
-procname[1] = 0;
-}
-
-if (dladdr((void *)(pip.start_ip + off), dlinfo)  dlinfo.dli_fname 

-*dlinfo.dli_fname)
-filename = dlinfo.dli_fname;
-else
-filename = ?;
-
-ErrorFSigSafe(%u: %s (%s%s+0x%x) [%p]\n, i++, filename, procname,
-ret == -UNW_ENOMEM ? ... : , (int)off,
-(void *)(pip.start_ip + off));
-
-ret = unw_step(cursor);
-if (ret  0)
-ErrorFSigSafe(unw_step failed: %s [%d]\n, unw_strerror(ret), 
ret);
-}
-ErrorFSigSafe(\n);
-}
-#else /* HAVE_LIBUNWIND */
 #ifdef HAVE_BACKTRACE
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
@@ -321,4 +247,3 @@ xorg_backtrace(void)
 
 #endif
 #endif
-#endif
-- 
1.8.3.1

___
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 2/5] os: use a constant for backtrace array size

2013-10-29 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
 os/backtrace.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/os/backtrace.c b/os/backtrace.c
index 426f9b1..3d1195b 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -114,14 +114,15 @@ xorg_backtrace(void)
 void
 xorg_backtrace(void)
 {
-void *array[64];
+const int BT_SIZE = 64;
+void *array[BT_SIZE];
 const char *mod;
 int size, i;
 Dl_info info;
 
 ErrorFSigSafe(\n);
 ErrorFSigSafe(Backtrace:\n);
-size = backtrace(array, 64);
+size = backtrace(array, BT_SIZE);
 for (i = 0; i  size; i++) {
 int rc = dladdr(array[i], info);
 
-- 
1.8.3.1

___
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 5/5] os: compress two conditions

2013-10-29 Thread Peter Hutterer
The recent change to use elfutils made these conditions almost identical.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
 os/backtrace.c | 29 +++--
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/os/backtrace.c b/os/backtrace.c
index acf110a..c3a31bc 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -134,32 +134,25 @@ xorg_backtrace(void)
 size = backtrace(array, BT_SIZE);
 for (i = 0; i  size; i++) {
 int rc = dladdr(array[i], info);
+const char *name;
+unsigned int addr;
 
 if (rc == 0) {
 ErrorFSigSafe(%u: ?? [%p]\n, i, array[i]);
 continue;
 }
 mod = (info.dli_fname  *info.dli_fname) ? info.dli_fname : (vdso);
-if (info.dli_saddr)
-ErrorFSigSafe(
-%u: %s (%s+0x%x) [%p]\n,
-i,
-mod,
-info.dli_sname,
-(unsigned int)((char *) array[i] -
-   (char *) info.dli_saddr),
-array[i]);
+
+if (info.dli_saddr) {
+name = info.dli_sname;
+addr = (unsigned int)((char *) array[i] - (char *) info.dli_saddr);
+}
 else {
-const char *name = symbol_name(array[i], info.dli_fbase);
-ErrorFSigSafe(
-%u: %s (%s+0x%x) [%p]\n,
-i,
-mod,
-name,
-(unsigned int)((char *) array[i] -
-   (char *) info.dli_fbase),
-array[i]);
+name = symbol_name(array[i], info.dli_fbase);
+addr = (unsigned int)((char *) array[i] - (char *) info.dli_fbase);
 }
+
+ErrorFSigSafe(%u: %s (%s+0x%x) [%p]\n, i, mod, name, addr, array[i]);
 }
 ErrorFSigSafe(\n);
 }
-- 
1.8.3.1

___
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 4/5] Support backtracing through elfutils (#70746)

2013-10-29 Thread Peter Hutterer
From Jan Kratochvil:
There is a longterm plan to obsolete libunwind from Fedora by new elfutils
unwinder.  But xorg-x11-server does not even need any external (non-glibc)
unwinder.

According to e21e183059df5975e7086850d1931edb2c1bbd06 you do only
self-backtrace (called local unwinding by libunwind).  glibc backtrace() can
do the same.  According to the sample backtrace in the patch above the
backtrace addresses there are the same in before/after cases, libunwind only
adds resolving of address - symbol name there, IIUC.

address - symbol name resolving can be done with RH-supported elfutils
package.

X.Org Bug 70746 http://bugs.freedesktop.org/show_bug.cgi?id=70746

Cc: Marcin Slusarz marcin.slus...@gmail.com
Cc: Jan Kratochvil jan.kratoch...@redhat.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
This may need some extra linux checks...

 configure.ac| 10 --
 include/dix-config.h.in |  3 ++
 os/backtrace.c  | 91 +++--
 3 files changed, 99 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index d36aefc..0e589f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,12 @@ AC_CHECK_HEADER([execinfo.h],[
 ])]
 )
 
+dnl elfutils for backtrace symbol lookup
+AC_CHECK_HEADER([elfutils/libdwfl.h],
+[AC_DEFINE(HAVE_ELFUTILS, 1, [Has elfutils])
+ ELFUTILS_LIBS=-ldw])
+AC_SUBST(ELFUTILS_LIBS)
+
 dnl ---
 dnl Bus options and CPU capabilities.  Replaces logic in
 dnl hw/xfree86/os-support/bus/Makefile.am, among others.
@@ -1339,10 +1345,10 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
 
 if test x$SPECIAL_DTRACE_OBJECTS = xyes ; then
   DIX_LIB='$(top_builddir)/dix/dix.O'
-  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(ELFUTILS_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
-  OS_LIB='$(top_builddir)/os/libos.la'
+  OS_LIB='$(top_builddir)/os/libos.la $(ELFUTILS_LIBS)'
 fi
 AC_SUBST([DIX_LIB])
 AC_SUBST([OS_LIB])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index e1cb9eb..c7c0a8a 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -60,6 +60,9 @@
 /* Has backtrace support */
 #undef HAVE_BACKTRACE
 
+/* Has elfutils */
+#undef HAVE_ELFUTILS
+
 /* Define to 1 if you have the byteswap.h header file. */
 #undef HAVE_BYTESWAP_H
 
diff --git a/os/backtrace.c b/os/backtrace.c
index c807bd2..acf110a 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -37,6 +37,89 @@
 #include dlfcn.h
 #include execinfo.h
 
+#ifdef HAVE_ELFUTILS
+#include unistd.h
+#include elfutils/libdwfl.h
+
+static Dwfl*
+dwfl_get(void)
+{
+static char *debuginfo_path;
+static Dwfl *dwfl;
+
+static const Dwfl_Callbacks proc_callbacks = {
+.find_debuginfo = dwfl_standard_find_debuginfo,
+.debuginfo_path = debuginfo_path,
+.find_elf = dwfl_linux_proc_find_elf,
+   };
+
+if (dwfl)
+return dwfl;
+
+dwfl = dwfl_begin(proc_callbacks);
+if (!dwfl)
+return NULL;
+
+errno = 0;
+if (dwfl_linux_proc_report(dwfl, getpid ()) != 0 ||
+dwfl_report_end(dwfl, NULL, NULL) != 0)
+{
+ErrorFSigSafe(dwfl reporting: %s\n, sterror(errno));
+dwfl_end(dwfl);
+dwfl = NULL;
+abort();
+}
+
+return dwfl;
+}
+
+struct getmodules_callback_arg {
+void *addr;
+const char *name;
+};
+
+static int
+getmodules_callback(Dwfl_Module *module,
+void **userdata,
+const char *module_name,
+Dwarf_Addr module_low_addr, void *arg)
+{
+struct getmodules_callback_arg *cbarg = arg;
+cbarg-name = dwfl_module_addrname(module, (GElf_Addr)cbarg-addr);
+return cbarg-name ? DWARF_CB_ABORT : DWARF_CB_OK;
+}
+
+static const char*
+addr_lookup(void *addr)
+{
+Dwfl *dwfl = dwfl_get();
+struct getmodules_callback_arg arg;
+
+arg.name = NULL;
+arg.addr = addr;
+dwfl_getmodules(dwfl, getmodules_callback, arg, 0);
+return arg.name;
+}
+#endif
+
+static const char*
+symbol_name(void *addr, void *fbase)
+{
+const char *name = NULL;
+
+#ifdef HAVE_ELFUTILS
+name = addr_lookup(addr);
+#endif
+
+if (!name) {
+static char buf[20];
+sprintf(buf, %p, fbase);
+name = buf;
+}
+
+return name;
+}
+
 void
 xorg_backtrace(void)
 {
@@ -66,15 +149,17 @@ xorg_backtrace(void)
 (unsigned int)((char *) array[i] -
(char *) info.dli_saddr),
 array[i]);
-else
+else {
+const char *name = symbol_name(array[i], info.dli_fbase);
 ErrorFSigSafe(
-%u: %s (%p+0x%x) [%p]\n,
+%u: %s (%s+0x%x) [%p]\n,
 i,
 mod,
-info.dli_fbase,
+name,

[PATCH 1/5] configure: remove a comment

2013-10-29 Thread Peter Hutterer
94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so
this comment is outdated. since no-one noticed and it's easier to just grep
than update file references, remove the comment.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7b4e70f..5cd8b25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,7 +300,7 @@ AC_CHECK_HEADER([machine/apmvar.h],[
 AM_CONDITIONAL(BSD_APM, [test x$ac_cv_BSD_APM = xyes])
 AM_CONDITIONAL(BSD_KQUEUE_APM, [test x$ac_cv_BSD_KQUEUE_APM = xyes])

-dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c)
+dnl glibc backtrace support check
 AC_CHECK_HEADER([execinfo.h],[
 AC_CHECK_LIB(c, backtrace, [
 AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])
-- 
1.8.3.1

___
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: [RFC] X.Org minimum requirements for Autotools policy review

2013-10-29 Thread Gaetan Nadon
On 13-10-29 05:52 PM, Peter Hutterer wrote:
 On Tue, Oct 29, 2013 at 09:16:53AM -0400, Gaetan Nadon wrote:
 On 13-10-24 02:17 PM, Gaetan Nadon wrote:
 Recommendations

  1. We should prereq libtool 2.2 as a minimum (available since 2008).
  2. We should prereq autoconf 2.62 as a minimum (available since
 2008). Keeps us in the same time period and is required by
 automake 1.11.
  3. We should prereq automake 1.11 (available since 2009). Keeps us in
 the same time period. 

 If the policy is changed, the wiki will be updated.

 Let's get started with libtool. No one is objecting to libtool 2.2. It's
 been in use for several years.

 This will allow fixing some warnings and prevent some errors like having
 both AC_PROG_LIBTOOL and LT_INIT statements. It will prevent developers
 from wasting time tripping on obsolete code.

 The X.Org Modular Tree Developer's Guide:

 http://www.x.org/wiki/ModularDevelopersGuide/#index2h3
 while I see this link: it would be a good idea to rename this page to a
 generic how to build. These days, modular tree isn't as obvious anymore
 since we haven't had the monolithic tree for 7-or-so years.
I had this thought a few years back.

 Cheers,
Peter


___
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 synaptics] Prevent button mashing on clickpads

2013-10-29 Thread Peter Hutterer
On Sun, Oct 27, 2013 at 04:24:47PM -0700, Daniel Colascione wrote:
 The tiny patch below disables the clickpad hardware button when
 syndaemon has asked us to disable tapping.  Without this patch, I
 frequently find myself accidentally clicking while typing.

isn't this a physical button? if so, it'd be better to just disable the
touchpad fully instead of just disabling tapping.

Cheers,
   Peter



 
 Index: src/synaptics.c
 ===
 --- src/synaptics.c   2013-10-27 01:52:44.586863030 -0700
 +++ src/synaptics.c   2013-10-27 01:52:53.442862768 -0700
 @@ -2797,6 +2797,11 @@
  return delay;
  }
 
 +/* If we have a clickpad and we've been asked to disable taps,
 + * also pretend the hardware button isn't pressed. */
 +if (para-touchpad_off == TOUCHPAD_TAP_OFF  para-clickpad)
 +hw-left = hw-middle = hw-right = FALSE;
 +
  /* We need both and x/y, the driver can't handle just one of the two
   * yet. But since it's possible to hit a phys button on non-clickpads
   * without ever getting motion data first, we must continue
 with 0/0 for
 ___
 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
 
___
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 synaptics] Circular exclusion areas

2013-10-29 Thread Peter Hutterer
On Mon, Oct 28, 2013 at 12:54:58AM -0700, Daniel Colascione wrote:
 The attached patch adds support for defining circular dead areas
 around corners.  At least in my use case, it doesn't make sense to
 make large areas of the trackpad dead when only the corners are
 problematic.
 
I need more info here. what exactly is  the problematic bit about the
corners?

 Index: include/synaptics-properties.h
 ===
 --- include/synaptics-properties.h2013-10-28 00:28:54.231827661 -0700
 +++ xserver-xorg-input-synaptics-1.7.1/include/synaptics-properties.h 
 2013-10-28 00:28:54.219827661 -0700
 @@ -149,6 +149,9 @@
  /* 32 bit, 4 values, left, right, top, bottom */
  #define SYNAPTICS_PROP_AREA Synaptics Area
  
 +/* 32 bit, 4 values, top-left, top-right, bottom-right, bottom-left */
 +#define SYNAPTICS_PROP_CORNERS Synaptics Corners
 +
  /* 32 bit, 4 values, left, right, top, buttom */
  #define SYNAPTICS_PROP_SOFTBUTTON_AREAS Synaptics Soft Button Areas
  
 Index: xserver-xorg-input-synaptics-1.7.1/man/synaptics.man
 ===
 --- man/synaptics.man 2013-10-28 00:28:54.231827661 -0700
 +++ xserver-xorg-input-synaptics-1.7.1/man/synaptics.man  2013-10-28 
 00:28:54.223827661 -0700
 @@ -446,6 +446,47 @@
  the total height of the touchpad. Property: Synaptics Area
  .
  .TP
 +.BI Option \*qCornerTopLeft\*q \*q integer \*q
 +Ignore movements, scrolling and tapping which take place near
 +the top-left corner.
 +.
 +The option is disabled by default and can be enabled by setting the
 +CornerTopLeft option to any integer value other than zero. If supported by 
 the
 +server (version 1.9 and later), the distance may be specified in percent of
 +the total width of the touchpad.
 +.
 +.TP
 +.BI Option \*qCornerTopRight\*q \*q integer \*q
 +Ignore movements, scrolling and tapping which take place near
 +the top-right corner.
 +.
 +The option is disabled by default and can be enabled by setting the
 +CornerTopRight option to any integer value other than zero. If supported by 
 the
 +server (version 1.9 and later), the distance may be specified in percent of
 +the total width of the touchpad.

fwiw we depend on server 1.12 or later anyway

 +.
 +.TP
 +.BI Option \*qCornerBottomLeft\*q \*q integer \*q
 +Ignore movements, scrolling and tapping which take place near
 +the bottom-left corner.
 +.
 +The option is disabled by default and can be enabled by setting the
 +CornerBottomLeft option to any integer value other than zero. If supported 
 by the
 +server (version 1.9 and later), the distance may be specified in percent of
 +the total width of the touchpad.
 +.
 +.TP
 +.BI Option \*qCornerBottomRight\*q \*q integer \*q
 +Ignore movements, scrolling and tapping which take place near
 +the bottom-right corner.
 +.
 +The option is disabled by default and can be enabled by setting the
 +CornerBottomRight option to any integer value other than zero. If
 +supported by the
 +server (version 1.9 and later), the distance may be specified in percent of
 +the total width of the touchpad.
 +.
 +.TP
  .BI Option \*qSoftButtonAreas\*q \*q RBL RBR RBT RBB MBL MBR MBT MBB \*q
  This option is only available on ClickPad devices. 
  Enable soft button click area support on ClickPad devices. 
 Index: xserver-xorg-input-synaptics-1.7.1/src/properties.c
 ===
 --- src/properties.c  2013-10-28 00:28:54.231827661 -0700
 +++ xserver-xorg-input-synaptics-1.7.1/src/properties.c   2013-10-28 
 00:28:54.223827661 -0700
 @@ -88,6 +88,7 @@
  Atom prop_capabilities = 0;
  Atom prop_resolution = 0;
  Atom prop_area = 0;
 +Atom prop_corners = 0;
  Atom prop_softbutton_areas = 0;
  Atom prop_noise_cancellation = 0;
  Atom prop_product_id = 0;
 @@ -337,6 +338,12 @@
  values[3] = para-area_bottom_edge;
  prop_area = InitAtom(pInfo-dev, SYNAPTICS_PROP_AREA, 32, 4, values);
  
 +values[0] = para-corner_top_left;
 +values[1] = para-corner_top_right;
 +values[2] = para-corner_bottom_right;
 +values[3] = para-corner_bottom_left;
 +prop_corners = InitAtom(pInfo-dev, SYNAPTICS_PROP_CORNERS, 32, 4, 
 values);
 +
  if (para-clickpad)
  InitSoftButtonProperty(pInfo);
  
 @@ -691,6 +698,18 @@
  para-area_top_edge = area[2];
  para-area_bottom_edge = area[3];
  }
 +else if (property == prop_corners) {
 +INT32 *corners;
 +
 +if (prop-size != 4 || prop-format != 32 || prop-type != 
 XA_INTEGER)
 +return BadMatch;
 +
 +corners = (INT32 *) prop-data;
 +para-corner_top_left = corners[0];
 +para-corner_top_right = corners[1];
 +para-corner_bottom_right = corners[2];
 +para-corner_bottom_left = corners[3];
 +}
  else if (property == prop_softbutton_areas) {
  int *areas;
  
 Index: xserver-xorg-input-synaptics-1.7.1/src/synaptics.c
 

Re: [PATCH synaptics] Prevent button mashing on clickpads

2013-10-29 Thread Daniel Colascione

On 10/29/2013 05:04 PM, Peter Hutterer wrote:

On Sun, Oct 27, 2013 at 04:24:47PM -0700, Daniel Colascione wrote:

The tiny patch below disables the clickpad hardware button when
syndaemon has asked us to disable tapping.  Without this patch, I
frequently find myself accidentally clicking while typing.


isn't this a physical button? if so, it'd be better to just disable the
touchpad fully instead of just disabling tapping.


It's a physical button, but it's unlike other physical buttons in that 
it takes up the _entire trackpad_. It's a lot easier to trigger this 
button than it is to trigger a traditional button, so it really should 
be treated as a tap for disablement purposes.


The idea behind using TOUCHPAD_TAP_OFF instead of TOUCHPAD_OFF is to 
allow the user to move the cursor as soon as possible after typing. By 
the time the user gets around to actually clicking something, the 
type-inhibit delay will have expired and we'll have turned off 
TOUCHPAD_TAP_OFF. This way, the user never notices the delay --- users 
will take a few hundred ms to click anyway. If we used TOUCHPAD_OFF 
instead, you'd either have to shorten the delay or cause users more 
annoyance.

___
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 synaptics] Circular exclusion areas

2013-10-29 Thread Daniel Colascione

On 10/29/2013 05:09 PM, Peter Hutterer wrote:

On Mon, Oct 28, 2013 at 12:54:58AM -0700, Daniel Colascione wrote:

The attached patch adds support for defining circular dead areas
around corners.  At least in my use case, it doesn't make sense to
make large areas of the trackpad dead when only the corners are
problematic.


I need more info here. what exactly is  the problematic bit about the
corners?


On my machine (a Lenovo X1 Carbon), my palms frequently touch the 
corners of the clickpad while I'm typing; palm detection is broken 
because the kernel keeps reporting a finger width of zero. (See 
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1245328.) Even if 
palm detection were working, though, I don't think it'd help: z-values 
seem to be about the same when I'm using the trackpad and mashing it 
while typing.

___
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 1/4] Remove unused function entry/exit tracking framework

2013-10-29 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 utils.c   |   59 ---
 utils.h   |   60 
 xkbcomp.c |1 -
 3 files changed, 120 deletions(-)

diff --git a/utils.c b/utils.c
index 55efbe1..541c33e 100644
--- a/utils.c
+++ b/utils.c
@@ -88,65 +88,6 @@ uFree(Opaque ptr)
 }
 
 /******/
-/***  FUNCTION ENTRY TRACKING   ***/
-/******/
-
-static FILE *entryFile = NULL;
-int uEntryLevel;
-
-Boolean
-uSetEntryFile(char *name)
-{
-if ((entryFile != NULL)  (entryFile != stderr))
-{
-fprintf(entryFile, switching to %s\n, name ? name : stderr);
-fclose(entryFile);
-}
-if (name != NullString)
-entryFile = fopen(name, w);
-else
-entryFile = stderr;
-if (entryFile == NULL)
-{
-entryFile = stderr;
-return (False);
-}
-return (True);
-}
-
-void
-uEntry(int l, char *s, ...)
-{
-int i;
-va_list args;
-
-for (i = 0; i  uEntryLevel; i++)
-{
-putc(' ', entryFile);
-}
-va_start(args, s);
-vfprintf(entryFile, s, args);
-va_end(args);
-uEntryLevel += l;
-}
-
-void
-uExit(int l, char *rtVal)
-{
-int i;
-
-uEntryLevel -= l;
-if (uEntryLevel  0)
-uEntryLevel = 0;
-for (i = 0; i  uEntryLevel; i++)
-{
-putc(' ', entryFile);
-}
-fprintf(entryFile, --- %p\n, rtVal);
-return;
-}
-
-/******/
 /***   PRINT FUNCTIONS ***/
 /******/
 
diff --git a/utils.h b/utils.h
index b00067d..62c9f2f 100644
--- a/utils.h
+++ b/utils.h
@@ -277,64 +277,4 @@ extern
 #defineuDEBUG_NOI5(f,s,a,b,c,d,e)
 #endif
 
- extern Boolean uSetEntryFile(char *name);
- extern void uEntry(int /* l */ ,
-char * /* s  */ , ...
-) _X_ATTRIBUTE_PRINTF(2, 3);
-
- extern void uExit(int l, char *rtVal);
-#ifdef ENTRY_TRACKING_ON
-#defineENTRY_BIT   0x10
-#defineLOW_ENTRY_BIT   0x1000
-#defineENTER   (DEBUG_VARENTRY_BIT)
-#defineFLAG(fLag)  (DEBUG_VAR(fLag))
-
- extern int uEntryLevel;
-
-#defineuENTRY(s)   { if (ENTER) uEntry(1,s);}
-#defineuENTRY1(s,a){ if (ENTER) uEntry(1,s,a);}
-#defineuENTRY2(s,a,b)  { if (ENTER) uEntry(1,s,a,b);}
-#defineuENTRY3(s,a,b,c){ if (ENTER) uEntry(1,s,a,b,c);}
-#defineuENTRY4(s,a,b,c,d)  { if (ENTER) 
uEntry(1,s,a,b,c,d);}
-#defineuENTRY5(s,a,b,c,d,e){ if (ENTER) 
uEntry(1,s,a,b,c,d,e);}
-#defineuENTRY6(s,a,b,c,d,e,f)  { if (ENTER) 
uEntry(1,s,a,b,c,d,e,f);}
-#defineuENTRY7(s,a,b,c,d,e,f,g){ if (ENTER) 
uEntry(1,s,a,b,c,d,e,f,g);}
-#defineuRETURN(v)  { if (ENTER) uEntryLevel--; 
return(v); }
-#defineuVOIDRETURN { if (ENTER) uEntryLevel--; 
return; }
-
-#defineuFLAG_ENTRY(w,s){ if (FLAG(w)) uEntry(0,s);}
-#defineuFLAG_ENTRY1(w,s,a) { if (FLAG(w)) uEntry(0,s,a);}
-#defineuFLAG_ENTRY2(w,s,a,b)   { if (FLAG(w)) uEntry(0,s,a,b);}
-#defineuFLAG_ENTRY3(w,s,a,b,c) { if (FLAG(w)) 
uEntry(0,s,a,b,c);}
-#defineuFLAG_ENTRY4(w,s,a,b,c,d)   { if (FLAG(w)) 
uEntry(0,s,a,b,c,d);}
-#defineuFLAG_ENTRY5(w,s,a,b,c,d,e) { if (FLAG(w)) 
uEntry(0,s,a,b,c,d,e);}
-#defineuFLAG_ENTRY6(w,s,a,b,c,d,e,f)   { if (FLAG(w)) 
uEntry(0,s,a,b,c,d,e,f);}
-#defineuFLAG_ENTRY7(w,s,a,b,c,d,e,f,g) { 
if(FLAG(w))uEntry(0,s,a,b,c,d,e,f,g);}
-#defineuFLAG_RETURN(v) { return(v);}
-#defineuFLAG_VOIDRETURN{ return; }
-#else
-#defineuENTRY(s)
-#defineuENTRY1(s,a)
-#defineuENTRY2(s,a1,a2)
-#defineuENTRY3(s,a1,a2,a3)
-#defineuENTRY4(s,a1,a2,a3,a4)
-#defineuENTRY5(s,a1,a2,a3,a4,a5)
-#defineuENTRY6(s,a1,a2,a3,a4,a5,a6)
-#defineuENTRY7(s,a1,a2,a3,a4,a5,a6,a7)
-#defineuRETURN(v)  { return(v); }
-#defineuVOIDRETURN { return; }
-
-#defineuFLAG_ENTRY(f,s)
-#defineuFLAG_ENTRY1(f,s,a)
-#defineuFLAG_ENTRY2(f,s,a,b)
-#defineuFLAG_ENTRY3(f,s,a,b,c)
-#defineuFLAG_ENTRY4(f,s,a,b,c,d)
-#defineuFLAG_ENTRY5(f,s,a,b,c,d,e)
-#defineuFLAG_ENTRY6(f,s,a,b,c,d,e,g)
-#defineuFLAG_ENTRY7(f,s,a,b,c,d,e,g,h)
-#defineuFLAG_RETURN(v) { return(v);}
-#defineuFLAG_VOIDRETURN{ return; }
-#endif
-
-

[PATCH:xkbcomp 4/4] Fix many const char * warnings from gcc

2013-10-29 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 action.c |8 
 action.h |4 ++--
 compat.c |2 +-
 expr.c   |   12 ++--
 geometry.c   |   26 +-
 indicators.c |2 +-
 indicators.h |2 +-
 keytypes.c   |2 +-
 symbols.c|8 
 9 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/action.c b/action.c
index 3b82e64..4623c0c 100644
--- a/action.c
+++ b/action.c
@@ -41,7 +41,7 @@ static ExprDef constFalse;
 /******/
 
 static Bool
-stringToAction(char *str, unsigned *type_rtrn)
+stringToAction(const char *str, unsigned *type_rtrn)
 {
 if (str == NULL)
 return False;
@@ -134,7 +134,7 @@ stringToAction(char *str, unsigned *type_rtrn)
 }
 
 static Bool
-stringToField(char *str, unsigned *field_rtrn)
+stringToField(const char *str, unsigned *field_rtrn)
 {
 
 if (str == NULL)
@@ -1397,8 +1397,8 @@ HandleActionDef(ExprDef * def,
 
 int
 SetActionField(XkbDescPtr xkb,
-   char *elem,
-   char *field,
+   const char *elem,
+   const char *field,
ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)
 {
 ActionInfo *new, *old;
diff --git a/action.h b/action.h
index 2fb7a5e..983b06e 100644
--- a/action.h
+++ b/action.h
@@ -72,8 +72,8 @@ extern int HandleActionDef(ExprDef * /* def */ ,
 );
 
 extern int SetActionField(XkbDescPtr /* xkb */ ,
-  char * /* elem */ ,
-  char * /* field */ ,
+  const char * /* elem */ ,
+  const char * /* field */ ,
   ExprDef * /* index */ ,
   ExprDef * /* value */ ,
   ActionInfo ** /* info_rtrn */
diff --git a/compat.c b/compat.c
index f4d82a6..82fd4e6 100644
--- a/compat.c
+++ b/compat.c
@@ -494,7 +494,7 @@ static LookupEntry useModMapValues[] = {
 static int
 SetInterpField(SymInterpInfo * si,
XkbDescPtr xkb,
-   char *field,
+   const char *field,
ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
 {
 int ok = 1;
diff --git a/expr.c b/expr.c
index 195e0f3..e0f957c 100644
--- a/expr.c
+++ b/expr.c
@@ -292,7 +292,7 @@ ExprResolveModIndex(ExprDef * expr,
 IdentLookupFunc lookup, XPointer lookupPriv)
 {
 int ok = 0;
-char *bogus = NULL;
+const char *bogus = NULL;
 
 switch (expr-op)
 {
@@ -382,7 +382,7 @@ ExprResolveBoolean(ExprDef * expr,
IdentLookupFunc lookup, XPointer lookupPriv)
 {
 int ok = 0;
-char *bogus = NULL;
+const char *bogus = NULL;
 
 switch (expr-op)
 {
@@ -715,7 +715,7 @@ ExprResolveString(ExprDef * expr,
 ExprResult leftRtrn, rightRtrn;
 ExprDef *left;
 ExprDef *right;
-char *bogus = NULL;
+const char *bogus = NULL;
 
 switch (expr-op)
 {
@@ -729,7 +729,7 @@ ExprResolveString(ExprDef * expr,
 val_rtrn-str = XkbAtomGetString(NULL, expr-value.str);
 if (val_rtrn-str == NULL)
 {
-static char *empty = ;
+static const char *empty = ;
 val_rtrn-str = empty;
 }
 return True;
@@ -822,7 +822,7 @@ ExprResolveKeyName(ExprDef * expr,
 int ok = 0;
 ExprDef *left;
 ExprResult leftRtrn;
-char *bogus = NULL;
+const char *bogus = NULL;
 
 switch (expr-op)
 {
@@ -941,7 +941,7 @@ ExprResolveMask(ExprDef * expr,
 int ok = 0;
 ExprResult leftRtrn, rightRtrn;
 ExprDef *left, *right;
-char *bogus = NULL;
+const char *bogus = NULL;
 
 switch (expr-op)
 {
diff --git a/geometry.c b/geometry.c
index cfd1f51..2daa213 100644
--- a/geometry.c
+++ b/geometry.c
@@ -967,7 +967,7 @@ AddDoodad(SectionInfo * si, GeometryInfo * info, DoodadInfo 
* new)
 }
 
 static DoodadInfo *
-FindDfltDoodadByTypeName(char *name, SectionInfo * si, GeometryInfo * info)
+FindDfltDoodadByTypeName(const char *name, SectionInfo *si, GeometryInfo *info)
 {
 DoodadInfo *dflt;
 unsigned type;
@@ -1408,7 +1408,7 @@ HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr xkb, 
GeometryInfo * info,
 
 static int
 SetShapeField(ShapeInfo * si,
-  char *field,
+  const char *field,
   ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info)
 {
 ExprResult tmp;
@@ -1440,7 +1440,7 @@ SetShapeField(ShapeInfo * si,
 
 static int
 SetShapeDoodadField(DoodadInfo * di,
-char *field,
+const char *field,
 ExprDef * arrayNdx,
 ExprDef * value, SectionInfo * si, GeometryInfo * info)
 {
@@ -1510,14 +1510,14 @@ SetShapeDoodadField(DoodadInfo * di,
 
 static int
 SetTextDoodadField(DoodadInfo * di,
-   char *field,
+   const char *field,

[PATCH:xkbcomp 3/4] Convert remaining sprintf calls to snprintf

2013-10-29 Thread Alan Coopersmith
Most were fixed length or length checked anyway, this just saves time
doublechecking that.   (A few could be replaced by asprintf, but we
don't have a copy guaranteed to be reachable from this program yet.)

Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 expr.c |2 +-
 geometry.c |   10 +-
 listing.c  |9 +
 xkbcomp.c  |4 ++--
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/expr.c b/expr.c
index 96fd956..195e0f3 100644
--- a/expr.c
+++ b/expr.c
@@ -767,7 +767,7 @@ ExprResolveString(ExprDef * expr,
 new = (char *) uAlloc(len);
 if (new)
 {
-sprintf(new, %s%s, leftRtrn.str, rightRtrn.str);
+snprintf(new, len, %s%s, leftRtrn.str, rightRtrn.str);
 val_rtrn-str = new;
 return True;
 }
diff --git a/geometry.c b/geometry.c
index 7f65c3a..cfd1f51 100644
--- a/geometry.c
+++ b/geometry.c
@@ -258,9 +258,9 @@ ddText(Display * dpy, DoodadInfo * di)
 }
 if (di-section)
 {
-sprintf(buf, %s in section %s,
-XkbAtomText(dpy, di-name, XkbMessage), scText(dpy,
-   di-section));
+snprintf(buf, sizeof(buf), %s in section %s,
+ XkbAtomText(dpy, di-name, XkbMessage),
+ scText(dpy, di-section));
 return buf;
 }
 return XkbAtomText(dpy, di-name, XkbMessage);
@@ -3297,8 +3297,8 @@ FontFromParts(Atom fontTok,
 rtrn = uCalloc(totalSize, 1);
 if (rtrn)
 {
-sprintf(rtrn, FONT_TEMPLATE, font, weight, slant, setWidth, variant,
-size, encoding);
+snprintf(rtrn, totalSize, FONT_TEMPLATE, font, weight, slant,
+ setWidth, variant, size, encoding);
 }
 return rtrn;
 }
diff --git a/listing.c b/listing.c
index 11de88a..c7f5ef8 100644
--- a/listing.c
+++ b/listing.c
@@ -302,18 +302,19 @@ AddDirectory(char *head, char *ptrn, char *rest, char 
*map)
 {
 char *tmp, *filename;
 struct stat sbuf;
+size_t tmpsize;
 
 filename = FileName(file);
 if (!filename || filename[0] == '.')
 continue;
 if (ptrn  (!XkbNameMatchesPattern(filename, ptrn)))
 continue;
-tmp =
-(char *) uAlloc((head ? strlen(head) : 0) + strlen(filename) + 2);
+tmpsize = (head ? strlen(head) : 0) + strlen(filename) + 2;
+tmp = uAlloc(tmpsize);
 if (!tmp)
 continue;
-sprintf(tmp, %s%s%s, (head ? head : ), (head ? / : ),
-filename);
+snprintf(tmp, tmpsize, %s%s%s,
+ (head ? head : ), (head ? / : ), filename);
 if (stat(tmp, sbuf)  0)
 {
 uFree(tmp);
diff --git a/xkbcomp.c b/xkbcomp.c
index a4ee359..956e79c 100644
--- a/xkbcomp.c
+++ b/xkbcomp.c
@@ -745,7 +745,7 @@ parseArgs(int argc, char *argv[])
 ACTION(Exiting\n);
 exit(1);
 }
-sprintf(outputFile, stdin.%s, fileTypeExt[outputFormat]);
+snprintf(outputFile, len, stdin.%s, fileTypeExt[outputFormat]);
 }
 else if ((outputFile == NULL)  (inputFile != NULL))
 {
@@ -773,7 +773,7 @@ parseArgs(int argc, char *argv[])
 }
 ext = strrchr(base, '.');
 if (ext == NULL)
-sprintf(outputFile, %s.%s, base, fileTypeExt[outputFormat]);
+snprintf(outputFile, len, %s.%s, base, 
fileTypeExt[outputFormat]);
 else
 {
 strcpy(outputFile, base);
-- 
1.7.9.2

___
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 2/4] Remove unused uASSERT macro

2013-10-29 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 utils.h |9 -
 1 file changed, 9 deletions(-)

diff --git a/utils.h b/utils.h
index 62c9f2f..81f5893 100644
--- a/utils.h
+++ b/utils.h
@@ -219,15 +219,6 @@ uInformation(const char * /* s */ , ...
 
 /******/
 
-#ifdef ASSERTIONS_ON
-#defineuASSERT(where,why) \
-   {if (!(why)) uFatalError(assertion botched in %s ( why )\n,where);}
-#else
-#defineuASSERT(where,why)
-#endif
-
-/******/
-
 #ifndef DEBUG_VAR
 #defineDEBUG_VAR   debugFlags
 #endif
-- 
1.7.9.2

___
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 1/2] xstrdup - strdup

2013-10-29 Thread Alan Coopersmith
Missed in xalloc - malloc etal conversion in 0cdc9b8f850342

Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 src/FreeType/ftfuncs.c |4 ++--
 src/FreeType/xttcap.c  |   20 
 src/FreeType/xttcap.h  |9 -
 3 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index 918e3f3..091339d 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -2204,7 +2204,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
strcpy(*dynStrRealFileName+dirLen, p2+1);
capHead = p1;
} else {
-   *dynStrRealFileName = xstrdup(fileName);
+   *dynStrRealFileName = strdup(fileName);
if( *dynStrRealFileName == NULL ) {
result = AllocError;
goto quit;
@@ -2549,7 +2549,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
 if (SPropRecValList_search_record(listPropRecVal,
  contRecValue,
  CodeRange)) {
-   *dynStrTTCapCodeRange = xstrdup(SPropContainer_value_str(contRecValue));
+   *dynStrTTCapCodeRange = strdup(SPropContainer_value_str(contRecValue));
if( *dynStrTTCapCodeRange == NULL ) {
result = AllocError;
goto quit;
diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
index bf25cc5..c1d8e67 100644
--- a/src/FreeType/xttcap.c
+++ b/src/FreeType/xttcap.c
@@ -682,24 +682,4 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList 
*pThisList,
 return result;
 }
 
-
-/**
-  Functions (xttmisc)
- */
-
-/* strdup clone with using the allocator of X server */
-char *
-XttXstrdup(char const *str)
-{
-char *result;
-
-result = malloc(strlen(str)+1);
-
-if (result)
-strcpy(result, str);
-
-return result;
-}
-
-
 /* end of file */
diff --git a/src/FreeType/xttcap.h b/src/FreeType/xttcap.h
index 2931098..2822540 100644
--- a/src/FreeType/xttcap.h
+++ b/src/FreeType/xttcap.h
@@ -116,15 +116,6 @@ SPropRecValList_dump(SRefPropRecValList *refList);
 #define SPropContainer_value_str(contRecVal)\
   ((contRecVal)-uValue.dynStringValue)
 
-/**
-  Prototypes (xttmisc)
- */
-
-/* strdup clone */
-char * XttXstrdup(char const *str);
-#undef xstrdup
-#define xstrdup(s) XttXstrdup((char const*)s)
-
 #endif /* !def _XTTCAP_H_ */
 
 /* end of file */
-- 
1.7.9.2

___
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 2/2] Replace malloc(strlen)+strcpy/strcat calls with strdup

2013-10-29 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 src/FreeType/ftfuncs.c |4 +---
 src/FreeType/xttcap.c  |3 +--
 src/fontfile/fontdir.c |   10 +++---
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index 091339d..2c90cf9 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -2289,13 +2289,11 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr 
vals,
}
}
else{
-   *dynStrFTFileName = malloc(strlen(*dynStrRealFileName)+1);
+   *dynStrFTFileName = strdup(*dynStrRealFileName);
if( *dynStrFTFileName == NULL ){
result = AllocError;
goto quit;
}
-   **dynStrFTFileName = '\0';
-   strcat(*dynStrFTFileName,*dynStrRealFileName);
}
 }
 /*
diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
index c1d8e67..104dc89 100644
--- a/src/FreeType/xttcap.c
+++ b/src/FreeType/xttcap.c
@@ -234,14 +234,13 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
 {
 char *p;
 
-if (NULL == (p = malloc(strlen(strValue)+1))) {
+if (NULL == (p = strdup(strValue))) {
 fprintf(stderr,
 truetype font property : 
 cannot allocate memory.\n);
 result = True;
 goto quit;
 }
-strcpy(p, strValue);
 SPropContainer_value_str(tmpContainerE) = p;
 }
 break;
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
index 97b2ba3..ef7ffa5 100644
--- a/src/fontfile/fontdir.c
+++ b/src/fontfile/fontdir.c
@@ -425,17 +425,13 @@ FontFileCountDashes (char *name, int namelen)
 return ndashes;
 }
 
+/* exported in public API in X11/fonts/fntfil.h */
 char *
 FontFileSaveString (char *s)
 {
-char*n;
-
-n = malloc (strlen (s) + 1);
-if (!n)
-   return 0;
-strcpy (n, s);
-return n;
+return strdup(s);
 }
+#define FontFileSaveString(s) strdup(s)
 
 FontEntryPtr
 FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat,
-- 
1.7.9.2

___
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: [RFC] X.Org minimum requirements for Autotools policy review

2013-10-29 Thread Gaetan Nadon
On 13-10-29 05:52 PM, Peter Hutterer wrote:
 On Tue, Oct 29, 2013 at 09:16:53AM -0400, Gaetan Nadon wrote:
 On 13-10-24 02:17 PM, Gaetan Nadon wrote:
 Recommendations

  1. We should prereq libtool 2.2 as a minimum (available since 2008).
  2. We should prereq autoconf 2.62 as a minimum (available since
 2008). Keeps us in the same time period and is required by
 automake 1.11.
  3. We should prereq automake 1.11 (available since 2009). Keeps us in
 the same time period. 

 If the policy is changed, the wiki will be updated.

 Let's get started with libtool. No one is objecting to libtool 2.2. It's
 been in use for several years.

 This will allow fixing some warnings and prevent some errors like having
 both AC_PROG_LIBTOOL and LT_INIT statements. It will prevent developers
 from wasting time tripping on obsolete code.

 The X.Org Modular Tree Developer's Guide:

 http://www.x.org/wiki/ModularDevelopersGuide/#index2h3
 while I see this link: it would be a good idea to rename this page to a
 generic how to build. These days, modular tree isn't as obvious anymore
 since we haven't had the monolithic tree for 7-or-so years.
http://www.x.org/wiki/Building_the_X_Window_System/

There was a hint for the new title in the introduction. Seemed like a
perfect fit.

Introduction

This guide is for developers who wish to *build the X Window System
from source*. If your area of interest is limited to a single
package, like a driver or an application, check with your O/S first
for development facilities.


 Cheers,
Peter


___
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 2/2] Replace malloc(strlen)+strcpy/strcat calls with strdup

2013-10-29 Thread Jasper St. Pierre
On Tue, Oct 29, 2013 at 9:55 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  src/FreeType/ftfuncs.c |4 +---
  src/FreeType/xttcap.c  |3 +--
  src/fontfile/fontdir.c |   10 +++---
  3 files changed, 5 insertions(+), 12 deletions(-)

 diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
 index 091339d..2c90cf9 100644
 --- a/src/FreeType/ftfuncs.c
 +++ b/src/FreeType/ftfuncs.c
 @@ -2289,13 +2289,11 @@ FreeTypeSetUpTTCap( char *fileName,
 FontScalablePtr vals,
 }
 }
 else{
 -   *dynStrFTFileName = malloc(strlen(*dynStrRealFileName)+1);
 +   *dynStrFTFileName = strdup(*dynStrRealFileName);
 if( *dynStrFTFileName == NULL ){
 result = AllocError;
 goto quit;
 }
 -   **dynStrFTFileName = '\0';
 -   strcat(*dynStrFTFileName,*dynStrRealFileName);
 }
  }
  /*
 diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
 index c1d8e67..104dc89 100644
 --- a/src/FreeType/xttcap.c
 +++ b/src/FreeType/xttcap.c
 @@ -234,14 +234,13 @@ SPropRecValList_add_record(SDynPropRecValList
 *pThisList,
  {
  char *p;

 -if (NULL == (p = malloc(strlen(strValue)+1))) {
 +if (NULL == (p = strdup(strValue))) {
  fprintf(stderr,
  truetype font property : 
  cannot allocate memory.\n);
  result = True;
  goto quit;
  }
 -strcpy(p, strValue);
  SPropContainer_value_str(tmpContainerE) = p;
  }
  break;
 diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
 index 97b2ba3..ef7ffa5 100644
 --- a/src/fontfile/fontdir.c
 +++ b/src/fontfile/fontdir.c
 @@ -425,17 +425,13 @@ FontFileCountDashes (char *name, int namelen)
  return ndashes;
  }

 +/* exported in public API in X11/fonts/fntfil.h */
  char *
  FontFileSaveString (char *s)
  {
 -char*n;
 -
 -n = malloc (strlen (s) + 1);
 -if (!n)
 -   return 0;
 -strcpy (n, s);
 -return n;
 +return strdup(s);
  }
 +#define FontFileSaveString(s) strdup(s)


Shouldn't this #define be in a header file to be useful?


  FontEntryPtr
  FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat,
 --
 1.7.9.2

 ___
 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




-- 
  Jasper
___
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 1/2] xstrdup - strdup

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 9:55 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Missed in xalloc - malloc etal conversion in 0cdc9b8f850342

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  src/FreeType/ftfuncs.c |4 ++--
  src/FreeType/xttcap.c  |   20 
  src/FreeType/xttcap.h  |9 -
  3 files changed, 2 insertions(+), 31 deletions(-)

 diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
 index 918e3f3..091339d 100644
 --- a/src/FreeType/ftfuncs.c
 +++ b/src/FreeType/ftfuncs.c
 @@ -2204,7 +2204,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr
 vals,
 strcpy(*dynStrRealFileName+dirLen, p2+1);
 capHead = p1;
 } else {
 -   *dynStrRealFileName = xstrdup(fileName);
 +   *dynStrRealFileName = strdup(fileName);
 if( *dynStrRealFileName == NULL ) {
 result = AllocError;
 goto quit;
 @@ -2549,7 +2549,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr
 vals,
  if (SPropRecValList_search_record(listPropRecVal,
   contRecValue,
   CodeRange)) {
 -   *dynStrTTCapCodeRange =
 xstrdup(SPropContainer_value_str(contRecValue));
 +   *dynStrTTCapCodeRange =
 strdup(SPropContainer_value_str(contRecValue));
 if( *dynStrTTCapCodeRange == NULL ) {
 result = AllocError;
 goto quit;
 diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
 index bf25cc5..c1d8e67 100644
 --- a/src/FreeType/xttcap.c
 +++ b/src/FreeType/xttcap.c
 @@ -682,24 +682,4 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList
 *pThisList,
  return result;
  }

 -

 -/**
 -  Functions (xttmisc)
 - */
 -
 -/* strdup clone with using the allocator of X server */
 -char *
 -XttXstrdup(char const *str)
 -{
 -char *result;
 -
 -result = malloc(strlen(str)+1);
 -
 -if (result)
 -strcpy(result, str);
 -
 -return result;
 -}
 -
 -
  /* end of file */
 diff --git a/src/FreeType/xttcap.h b/src/FreeType/xttcap.h
 index 2931098..2822540 100644
 --- a/src/FreeType/xttcap.h
 +++ b/src/FreeType/xttcap.h
 @@ -116,15 +116,6 @@ SPropRecValList_dump(SRefPropRecValList *refList);
  #define SPropContainer_value_str(contRecVal)\
((contRecVal)-uValue.dynStringValue)

 -/**
 -  Prototypes (xttmisc)
 - */
 -
 -/* strdup clone */
 -char * XttXstrdup(char const *str);
 -#undef xstrdup
 -#define xstrdup(s) XttXstrdup((char const*)s)
 -
  #endif /* !def _XTTCAP_H_ */

  /* end of file */
 --
 1.7.9.2

 ___
 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




-- 
  Jasper
___
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:xkbcomp 1/4] Remove unused function entry/exit tracking framework

2013-10-29 Thread Jasper St. Pierre
Cool.

Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 9:51 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  utils.c   |   59
 ---
  utils.h   |   60
 
  xkbcomp.c |1 -
  3 files changed, 120 deletions(-)

 diff --git a/utils.c b/utils.c
 index 55efbe1..541c33e 100644
 --- a/utils.c
 +++ b/utils.c
 @@ -88,65 +88,6 @@ uFree(Opaque ptr)
  }


  /******/
 -/***  FUNCTION ENTRY TRACKING
 ***/

 -/******/
 -
 -static FILE *entryFile = NULL;
 -int uEntryLevel;
 -
 -Boolean
 -uSetEntryFile(char *name)
 -{
 -if ((entryFile != NULL)  (entryFile != stderr))
 -{
 -fprintf(entryFile, switching to %s\n, name ? name : stderr);
 -fclose(entryFile);
 -}
 -if (name != NullString)
 -entryFile = fopen(name, w);
 -else
 -entryFile = stderr;
 -if (entryFile == NULL)
 -{
 -entryFile = stderr;
 -return (False);
 -}
 -return (True);
 -}
 -
 -void
 -uEntry(int l, char *s, ...)
 -{
 -int i;
 -va_list args;
 -
 -for (i = 0; i  uEntryLevel; i++)
 -{
 -putc(' ', entryFile);
 -}
 -va_start(args, s);
 -vfprintf(entryFile, s, args);
 -va_end(args);
 -uEntryLevel += l;
 -}
 -
 -void
 -uExit(int l, char *rtVal)
 -{
 -int i;
 -
 -uEntryLevel -= l;
 -if (uEntryLevel  0)
 -uEntryLevel = 0;
 -for (i = 0; i  uEntryLevel; i++)
 -{
 -putc(' ', entryFile);
 -}
 -fprintf(entryFile, --- %p\n, rtVal);
 -return;
 -}
 -

 -/******/
  /***   PRINT FUNCTIONS
 ***/

  /******/

 diff --git a/utils.h b/utils.h
 index b00067d..62c9f2f 100644
 --- a/utils.h
 +++ b/utils.h
 @@ -277,64 +277,4 @@ extern
  #defineuDEBUG_NOI5(f,s,a,b,c,d,e)
  #endif

 - extern Boolean uSetEntryFile(char *name);
 - extern void uEntry(int /* l */ ,
 -char * /* s  */ , ...
 -) _X_ATTRIBUTE_PRINTF(2, 3);
 -
 - extern void uExit(int l, char *rtVal);
 -#ifdef ENTRY_TRACKING_ON
 -#defineENTRY_BIT   0x10
 -#defineLOW_ENTRY_BIT   0x1000
 -#defineENTER   (DEBUG_VARENTRY_BIT)
 -#defineFLAG(fLag)  (DEBUG_VAR(fLag))
 -
 - extern int uEntryLevel;
 -
 -#defineuENTRY(s)   { if (ENTER) uEntry(1,s);}
 -#defineuENTRY1(s,a){ if (ENTER)
 uEntry(1,s,a);}
 -#defineuENTRY2(s,a,b)  { if (ENTER)
 uEntry(1,s,a,b);}
 -#defineuENTRY3(s,a,b,c){ if (ENTER)
 uEntry(1,s,a,b,c);}
 -#defineuENTRY4(s,a,b,c,d)  { if (ENTER)
 uEntry(1,s,a,b,c,d);}
 -#defineuENTRY5(s,a,b,c,d,e){ if (ENTER)
 uEntry(1,s,a,b,c,d,e);}
 -#defineuENTRY6(s,a,b,c,d,e,f)  { if (ENTER)
 uEntry(1,s,a,b,c,d,e,f);}
 -#defineuENTRY7(s,a,b,c,d,e,f,g){ if (ENTER)
 uEntry(1,s,a,b,c,d,e,f,g);}
 -#defineuRETURN(v)  { if (ENTER)
 uEntryLevel--; return(v); }
 -#defineuVOIDRETURN { if (ENTER)
 uEntryLevel--; return; }
 -
 -#defineuFLAG_ENTRY(w,s){ if (FLAG(w))
 uEntry(0,s);}
 -#defineuFLAG_ENTRY1(w,s,a) { if (FLAG(w))
 uEntry(0,s,a);}
 -#defineuFLAG_ENTRY2(w,s,a,b)   { if (FLAG(w))
 uEntry(0,s,a,b);}
 -#defineuFLAG_ENTRY3(w,s,a,b,c) { if (FLAG(w))
 uEntry(0,s,a,b,c);}
 -#defineuFLAG_ENTRY4(w,s,a,b,c,d)   { if (FLAG(w))
 uEntry(0,s,a,b,c,d);}
 -#defineuFLAG_ENTRY5(w,s,a,b,c,d,e) { if (FLAG(w))
 uEntry(0,s,a,b,c,d,e);}
 -#defineuFLAG_ENTRY6(w,s,a,b,c,d,e,f)   { if (FLAG(w))
 uEntry(0,s,a,b,c,d,e,f);}
 -#defineuFLAG_ENTRY7(w,s,a,b,c,d,e,f,g) {
 if(FLAG(w))uEntry(0,s,a,b,c,d,e,f,g);}
 -#defineuFLAG_RETURN(v) { return(v);}
 -#defineuFLAG_VOIDRETURN{ return; }
 -#else
 -#defineuENTRY(s)
 -#defineuENTRY1(s,a)
 -#defineuENTRY2(s,a1,a2)
 -#defineuENTRY3(s,a1,a2,a3)
 -#defineuENTRY4(s,a1,a2,a3,a4)
 -#defineuENTRY5(s,a1,a2,a3,a4,a5)
 -#defineuENTRY6(s,a1,a2,a3,a4,a5,a6)
 -#defineuENTRY7(s,a1,a2,a3,a4,a5,a6,a7)
 -#defineuRETURN(v)  { return(v); }
 -#defineuVOIDRETURN { return; }
 -
 -#defineuFLAG_ENTRY(f,s)
 -#defineuFLAG_ENTRY1(f,s,a)
 -#defineuFLAG_ENTRY2(f,s,a,b)
 -#defineuFLAG_ENTRY3(f,s,a,b,c)
 -#defineuFLAG_ENTRY4(f,s,a,b,c,d)
 -#define

Re: [PATCH:xkbcomp 4/4] Fix many const char * warnings from gcc

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 9:51 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  action.c |8 
  action.h |4 ++--
  compat.c |2 +-
  expr.c   |   12 ++--
  geometry.c   |   26 +-
  indicators.c |2 +-
  indicators.h |2 +-
  keytypes.c   |2 +-
  symbols.c|8 
  9 files changed, 33 insertions(+), 33 deletions(-)

 diff --git a/action.c b/action.c
 index 3b82e64..4623c0c 100644
 --- a/action.c
 +++ b/action.c
 @@ -41,7 +41,7 @@ static ExprDef constFalse;

  /******/

  static Bool
 -stringToAction(char *str, unsigned *type_rtrn)
 +stringToAction(const char *str, unsigned *type_rtrn)
  {
  if (str == NULL)
  return False;
 @@ -134,7 +134,7 @@ stringToAction(char *str, unsigned *type_rtrn)
  }

  static Bool
 -stringToField(char *str, unsigned *field_rtrn)
 +stringToField(const char *str, unsigned *field_rtrn)
  {

  if (str == NULL)
 @@ -1397,8 +1397,8 @@ HandleActionDef(ExprDef * def,

  int
  SetActionField(XkbDescPtr xkb,
 -   char *elem,
 -   char *field,
 +   const char *elem,
 +   const char *field,
 ExprDef * array_ndx, ExprDef * value, ActionInfo **
 info_rtrn)
  {
  ActionInfo *new, *old;
 diff --git a/action.h b/action.h
 index 2fb7a5e..983b06e 100644
 --- a/action.h
 +++ b/action.h
 @@ -72,8 +72,8 @@ extern int HandleActionDef(ExprDef * /* def */ ,
  );

  extern int SetActionField(XkbDescPtr /* xkb */ ,
 -  char * /* elem */ ,
 -  char * /* field */ ,
 +  const char * /* elem */ ,
 +  const char * /* field */ ,
ExprDef * /* index */ ,
ExprDef * /* value */ ,
ActionInfo ** /* info_rtrn */
 diff --git a/compat.c b/compat.c
 index f4d82a6..82fd4e6 100644
 --- a/compat.c
 +++ b/compat.c
 @@ -494,7 +494,7 @@ static LookupEntry useModMapValues[] = {
  static int
  SetInterpField(SymInterpInfo * si,
 XkbDescPtr xkb,
 -   char *field,
 +   const char *field,
 ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
  {
  int ok = 1;
 diff --git a/expr.c b/expr.c
 index 195e0f3..e0f957c 100644
 --- a/expr.c
 +++ b/expr.c
 @@ -292,7 +292,7 @@ ExprResolveModIndex(ExprDef * expr,
  IdentLookupFunc lookup, XPointer lookupPriv)
  {
  int ok = 0;
 -char *bogus = NULL;
 +const char *bogus = NULL;

  switch (expr-op)
  {
 @@ -382,7 +382,7 @@ ExprResolveBoolean(ExprDef * expr,
 IdentLookupFunc lookup, XPointer lookupPriv)
  {
  int ok = 0;
 -char *bogus = NULL;
 +const char *bogus = NULL;

  switch (expr-op)
  {
 @@ -715,7 +715,7 @@ ExprResolveString(ExprDef * expr,
  ExprResult leftRtrn, rightRtrn;
  ExprDef *left;
  ExprDef *right;
 -char *bogus = NULL;
 +const char *bogus = NULL;

  switch (expr-op)
  {
 @@ -729,7 +729,7 @@ ExprResolveString(ExprDef * expr,
  val_rtrn-str = XkbAtomGetString(NULL, expr-value.str);
  if (val_rtrn-str == NULL)
  {
 -static char *empty = ;
 +static const char *empty = ;
  val_rtrn-str = empty;
  }
  return True;
 @@ -822,7 +822,7 @@ ExprResolveKeyName(ExprDef * expr,
  int ok = 0;
  ExprDef *left;
  ExprResult leftRtrn;
 -char *bogus = NULL;
 +const char *bogus = NULL;

  switch (expr-op)
  {
 @@ -941,7 +941,7 @@ ExprResolveMask(ExprDef * expr,
  int ok = 0;
  ExprResult leftRtrn, rightRtrn;
  ExprDef *left, *right;
 -char *bogus = NULL;
 +const char *bogus = NULL;

  switch (expr-op)
  {
 diff --git a/geometry.c b/geometry.c
 index cfd1f51..2daa213 100644
 --- a/geometry.c
 +++ b/geometry.c
 @@ -967,7 +967,7 @@ AddDoodad(SectionInfo * si, GeometryInfo * info,
 DoodadInfo * new)
  }

  static DoodadInfo *
 -FindDfltDoodadByTypeName(char *name, SectionInfo * si, GeometryInfo *
 info)
 +FindDfltDoodadByTypeName(const char *name, SectionInfo *si, GeometryInfo
 *info)
  {
  DoodadInfo *dflt;
  unsigned type;
 @@ -1408,7 +1408,7 @@ HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr
 xkb, GeometryInfo * info,

  static int
  SetShapeField(ShapeInfo * si,
 -  char *field,
 +  const char *field,
ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info)
  {
  ExprResult tmp;
 @@ -1440,7 +1440,7 @@ SetShapeField(ShapeInfo * si,

  static int
  SetShapeDoodadField(DoodadInfo * di,
 -char *field,
 +const char *field,
  ExprDef * arrayNdx,

Re: [PATCH 1/5] configure: remove a comment

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer peter.hutte...@who-t.netwrote:

 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so
 this comment is outdated. since no-one noticed and it's easier to just grep
 than update file references, remove the comment.

 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
 ---
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/configure.ac b/configure.ac
 index 7b4e70f..5cd8b25 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -300,7 +300,7 @@ AC_CHECK_HEADER([machine/apmvar.h],[
  AM_CONDITIONAL(BSD_APM, [test x$ac_cv_BSD_APM = xyes])
  AM_CONDITIONAL(BSD_KQUEUE_APM, [test x$ac_cv_BSD_KQUEUE_APM = xyes])

 -dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c)
 +dnl glibc backtrace support check
  AC_CHECK_HEADER([execinfo.h],[
  AC_CHECK_LIB(c, backtrace, [
  AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])
 --
 1.8.3.1

 ___
 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




-- 
  Jasper
___
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 2/5] os: use a constant for backtrace array size

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer peter.hutte...@who-t.netwrote:

 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
 ---
  os/backtrace.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

 diff --git a/os/backtrace.c b/os/backtrace.c
 index 426f9b1..3d1195b 100644
 --- a/os/backtrace.c
 +++ b/os/backtrace.c
 @@ -114,14 +114,15 @@ xorg_backtrace(void)
  void
  xorg_backtrace(void)
  {
 -void *array[64];
 +const int BT_SIZE = 64;
 +void *array[BT_SIZE];
  const char *mod;
  int size, i;
  Dl_info info;

  ErrorFSigSafe(\n);
  ErrorFSigSafe(Backtrace:\n);
 -size = backtrace(array, 64);
 +size = backtrace(array, BT_SIZE);
  for (i = 0; i  size; i++) {
  int rc = dladdr(array[i], info);

 --
 1.8.3.1

 ___
 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




-- 
  Jasper
___
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:xkbcomp 2/4] Remove unused uASSERT macro

2013-10-29 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Tue, Oct 29, 2013 at 9:51 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  utils.h |9 -
  1 file changed, 9 deletions(-)

 diff --git a/utils.h b/utils.h
 index 62c9f2f..81f5893 100644
 --- a/utils.h
 +++ b/utils.h
 @@ -219,15 +219,6 @@ uInformation(const char * /* s */ , ...


  /******/

 -#ifdef ASSERTIONS_ON
 -#defineuASSERT(where,why) \
 -   {if (!(why)) uFatalError(assertion botched in %s ( why
 )\n,where);}
 -#else
 -#defineuASSERT(where,why)
 -#endif
 -

 -/******/
 -
  #ifndef DEBUG_VAR
  #defineDEBUG_VAR   debugFlags
  #endif
 --
 1.7.9.2

 ___
 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




-- 
  Jasper
___
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 5/5] os: compress two conditions

2013-10-29 Thread Jasper St. Pierre
almost identical? Mind expanding on this?


On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer peter.hutte...@who-t.netwrote:

 The recent change to use elfutils made these conditions almost identical.

 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
 ---
  os/backtrace.c | 29 +++--
  1 file changed, 11 insertions(+), 18 deletions(-)

 diff --git a/os/backtrace.c b/os/backtrace.c
 index acf110a..c3a31bc 100644
 --- a/os/backtrace.c
 +++ b/os/backtrace.c
 @@ -134,32 +134,25 @@ xorg_backtrace(void)
  size = backtrace(array, BT_SIZE);
  for (i = 0; i  size; i++) {
  int rc = dladdr(array[i], info);
 +const char *name;
 +unsigned int addr;

  if (rc == 0) {
  ErrorFSigSafe(%u: ?? [%p]\n, i, array[i]);
  continue;
  }
  mod = (info.dli_fname  *info.dli_fname) ? info.dli_fname :
 (vdso);
 -if (info.dli_saddr)
 -ErrorFSigSafe(
 -%u: %s (%s+0x%x) [%p]\n,
 -i,
 -mod,
 -info.dli_sname,
 -(unsigned int)((char *) array[i] -
 -   (char *) info.dli_saddr),
 -array[i]);
 +
 +if (info.dli_saddr) {
 +name = info.dli_sname;
 +addr = (unsigned int)((char *) array[i] - (char *)
 info.dli_saddr);
 +}
  else {
 -const char *name = symbol_name(array[i], info.dli_fbase);
 -ErrorFSigSafe(
 -%u: %s (%s+0x%x) [%p]\n,
 -i,
 -mod,
 -name,
 -(unsigned int)((char *) array[i] -
 -   (char *) info.dli_fbase),
 -array[i]);
 +name = symbol_name(array[i], info.dli_fbase);
 +addr = (unsigned int)((char *) array[i] - (char *)
 info.dli_fbase);
  }
 +
 +ErrorFSigSafe(%u: %s (%s+0x%x) [%p]\n, i, mod, name, addr,
 array[i]);
  }
  ErrorFSigSafe(\n);
  }
 --
 1.8.3.1

 ___
 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




-- 
  Jasper
___
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 4/5] Support backtracing through elfutils (#70746)

2013-10-29 Thread Jasper St. Pierre
I'm not a fan at all. This API is really bad compared to what's provided by
libbacktrace, which is super simple. This also seem to require callbacks
that have Linux in the name. Why are we trying to get rid of
libbacktrace, and what's the schedule for this?


On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer peter.hutte...@who-t.netwrote:

 From Jan Kratochvil:
 There is a longterm plan to obsolete libunwind from Fedora by new elfutils
 unwinder.  But xorg-x11-server does not even need any external (non-glibc)
 unwinder.

 According to e21e183059df5975e7086850d1931edb2c1bbd06 you do only
 self-backtrace (called local unwinding by libunwind).  glibc backtrace()
 can
 do the same.  According to the sample backtrace in the patch above the
 backtrace addresses there are the same in before/after cases, libunwind
 only
 adds resolving of address - symbol name there, IIUC.

 address - symbol name resolving can be done with RH-supported elfutils
 package.

 X.Org Bug 70746 http://bugs.freedesktop.org/show_bug.cgi?id=70746

 Cc: Marcin Slusarz marcin.slus...@gmail.com
 Cc: Jan Kratochvil jan.kratoch...@redhat.com
 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
 ---
 This may need some extra linux checks...

  configure.ac| 10 --
  include/dix-config.h.in |  3 ++
  os/backtrace.c  | 91
 +++--
  3 files changed, 99 insertions(+), 5 deletions(-)

 diff --git a/configure.ac b/configure.ac
 index d36aefc..0e589f8 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -308,6 +308,12 @@ AC_CHECK_HEADER([execinfo.h],[
  ])]
  )

 +dnl elfutils for backtrace symbol lookup
 +AC_CHECK_HEADER([elfutils/libdwfl.h],
 +[AC_DEFINE(HAVE_ELFUTILS, 1, [Has elfutils])
 + ELFUTILS_LIBS=-ldw])
 +AC_SUBST(ELFUTILS_LIBS)
 +
  dnl
 ---
  dnl Bus options and CPU capabilities.  Replaces logic in
  dnl hw/xfree86/os-support/bus/Makefile.am, among others.
 @@ -1339,10 +1345,10 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests
 extension])

  if test x$SPECIAL_DTRACE_OBJECTS = xyes ; then
DIX_LIB='$(top_builddir)/dix/dix.O'
 -  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
 +  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)
 $(ELFUTILS_LIBS)'
  else
DIX_LIB='$(top_builddir)/dix/libdix.la'
 -  OS_LIB='$(top_builddir)/os/libos.la'
 +  OS_LIB='$(top_builddir)/os/libos.la $(ELFUTILS_LIBS)'
  fi
  AC_SUBST([DIX_LIB])
  AC_SUBST([OS_LIB])
 diff --git a/include/dix-config.h.in b/include/dix-config.h.in
 index e1cb9eb..c7c0a8a 100644
 --- a/include/dix-config.h.in
 +++ b/include/dix-config.h.in
 @@ -60,6 +60,9 @@
  /* Has backtrace support */
  #undef HAVE_BACKTRACE

 +/* Has elfutils */
 +#undef HAVE_ELFUTILS
 +
  /* Define to 1 if you have the byteswap.h header file. */
  #undef HAVE_BYTESWAP_H

 diff --git a/os/backtrace.c b/os/backtrace.c
 index c807bd2..acf110a 100644
 --- a/os/backtrace.c
 +++ b/os/backtrace.c
 @@ -37,6 +37,89 @@
  #include dlfcn.h
  #include execinfo.h

 +#ifdef HAVE_ELFUTILS
 +#include unistd.h
 +#include elfutils/libdwfl.h
 +
 +static Dwfl*
 +dwfl_get(void)
 +{
 +static char *debuginfo_path;
 +static Dwfl *dwfl;
 +
 +static const Dwfl_Callbacks proc_callbacks = {
 +.find_debuginfo = dwfl_standard_find_debuginfo,
 +.debuginfo_path = debuginfo_path,
 +.find_elf = dwfl_linux_proc_find_elf,
 +   };
 +
 +if (dwfl)
 +return dwfl;
 +
 +dwfl = dwfl_begin(proc_callbacks);
 +if (!dwfl)
 +return NULL;
 +
 +errno = 0;
 +if (dwfl_linux_proc_report(dwfl, getpid ()) != 0 ||
 +dwfl_report_end(dwfl, NULL, NULL) != 0)
 +{
 +ErrorFSigSafe(dwfl reporting: %s\n, sterror(errno));
 +dwfl_end(dwfl);
 +dwfl = NULL;
 +abort();
 +}
 +
 +return dwfl;
 +}
 +
 +struct getmodules_callback_arg {
 +void *addr;
 +const char *name;
 +};
 +
 +static int
 +getmodules_callback(Dwfl_Module *module,
 +void **userdata,
 +const char *module_name,
 +Dwarf_Addr module_low_addr, void *arg)
 +{
 +struct getmodules_callback_arg *cbarg = arg;
 +cbarg-name = dwfl_module_addrname(module, (GElf_Addr)cbarg-addr);
 +return cbarg-name ? DWARF_CB_ABORT : DWARF_CB_OK;
 +}
 +
 +static const char*
 +addr_lookup(void *addr)
 +{
 +Dwfl *dwfl = dwfl_get();
 +struct getmodules_callback_arg arg;
 +
 +arg.name = NULL;
 +arg.addr = addr;
 +dwfl_getmodules(dwfl, getmodules_callback, arg, 0);
 +return arg.name;
 +}
 +#endif
 +
 +static const char*
 +symbol_name(void *addr, void *fbase)
 +{
 +const char *name = NULL;
 +
 +#ifdef HAVE_ELFUTILS
 +name = addr_lookup(addr);
 +#endif
 +
 +if (!name) {
 +static char buf[20];
 +sprintf(buf, %p, fbase);
 +name = buf;
 +}
 +
 +return name;
 +}
 +
  void
  xorg_backtrace(void)
  {

Re: [PATCH:xkbcomp 3/4] Convert remaining sprintf calls to snprintf

2013-10-29 Thread Jasper St. Pierre
You do know you can implement an asprintf-alike using vsnprintf, right?


On Tue, Oct 29, 2013 at 9:51 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 Most were fixed length or length checked anyway, this just saves time
 doublechecking that.   (A few could be replaced by asprintf, but we
 don't have a copy guaranteed to be reachable from this program yet.)

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  expr.c |2 +-
  geometry.c |   10 +-
  listing.c  |9 +
  xkbcomp.c  |4 ++--
  4 files changed, 13 insertions(+), 12 deletions(-)

 diff --git a/expr.c b/expr.c
 index 96fd956..195e0f3 100644
 --- a/expr.c
 +++ b/expr.c
 @@ -767,7 +767,7 @@ ExprResolveString(ExprDef * expr,
  new = (char *) uAlloc(len);
  if (new)
  {
 -sprintf(new, %s%s, leftRtrn.str, rightRtrn.str);
 +snprintf(new, len, %s%s, leftRtrn.str, rightRtrn.str);
  val_rtrn-str = new;
  return True;
  }
 diff --git a/geometry.c b/geometry.c
 index 7f65c3a..cfd1f51 100644
 --- a/geometry.c
 +++ b/geometry.c
 @@ -258,9 +258,9 @@ ddText(Display * dpy, DoodadInfo * di)
  }
  if (di-section)
  {
 -sprintf(buf, %s in section %s,
 -XkbAtomText(dpy, di-name, XkbMessage), scText(dpy,
 -
 di-section));
 +snprintf(buf, sizeof(buf), %s in section %s,
 + XkbAtomText(dpy, di-name, XkbMessage),
 + scText(dpy, di-section));
  return buf;
  }
  return XkbAtomText(dpy, di-name, XkbMessage);
 @@ -3297,8 +3297,8 @@ FontFromParts(Atom fontTok,
  rtrn = uCalloc(totalSize, 1);
  if (rtrn)
  {
 -sprintf(rtrn, FONT_TEMPLATE, font, weight, slant, setWidth,
 variant,
 -size, encoding);
 +snprintf(rtrn, totalSize, FONT_TEMPLATE, font, weight, slant,
 + setWidth, variant, size, encoding);
  }
  return rtrn;
  }
 diff --git a/listing.c b/listing.c
 index 11de88a..c7f5ef8 100644
 --- a/listing.c
 +++ b/listing.c
 @@ -302,18 +302,19 @@ AddDirectory(char *head, char *ptrn, char *rest,
 char *map)
  {
  char *tmp, *filename;
  struct stat sbuf;
 +size_t tmpsize;

  filename = FileName(file);
  if (!filename || filename[0] == '.')
  continue;
  if (ptrn  (!XkbNameMatchesPattern(filename, ptrn)))
  continue;
 -tmp =
 -(char *) uAlloc((head ? strlen(head) : 0) + strlen(filename)
 + 2);
 +tmpsize = (head ? strlen(head) : 0) + strlen(filename) + 2;
 +tmp = uAlloc(tmpsize);
  if (!tmp)
  continue;
 -sprintf(tmp, %s%s%s, (head ? head : ), (head ? / : ),
 -filename);
 +snprintf(tmp, tmpsize, %s%s%s,
 + (head ? head : ), (head ? / : ), filename);
  if (stat(tmp, sbuf)  0)
  {
  uFree(tmp);
 diff --git a/xkbcomp.c b/xkbcomp.c
 index a4ee359..956e79c 100644
 --- a/xkbcomp.c
 +++ b/xkbcomp.c
 @@ -745,7 +745,7 @@ parseArgs(int argc, char *argv[])
  ACTION(Exiting\n);
  exit(1);
  }
 -sprintf(outputFile, stdin.%s, fileTypeExt[outputFormat]);
 +snprintf(outputFile, len, stdin.%s, fileTypeExt[outputFormat]);
  }
  else if ((outputFile == NULL)  (inputFile != NULL))
  {
 @@ -773,7 +773,7 @@ parseArgs(int argc, char *argv[])
  }
  ext = strrchr(base, '.');
  if (ext == NULL)
 -sprintf(outputFile, %s.%s, base, fileTypeExt[outputFormat]);
 +snprintf(outputFile, len, %s.%s, base,
 fileTypeExt[outputFormat]);
  else
  {
  strcpy(outputFile, base);
 --
 1.7.9.2

 ___
 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




-- 
  Jasper
___
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 5/5] os: compress two conditions

2013-10-29 Thread Peter Hutterer
On Tue, Oct 29, 2013 at 10:10:34PM -0400, Jasper St. Pierre wrote:
 almost identical? Mind expanding on this?

the printf was a %s (symbol name) or %p (base addr) and the hex address
(depending on if we had a name or not). the pointer-to-string conversion is
now handled by symbol_name(), so now we print the same format string and it
only differs in two ways, name and addr.

Cheers,
   Peter


 On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer 
 peter.hutte...@who-t.netwrote:
 
  The recent change to use elfutils made these conditions almost identical.
 
  Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
  ---
   os/backtrace.c | 29 +++--
   1 file changed, 11 insertions(+), 18 deletions(-)
 
  diff --git a/os/backtrace.c b/os/backtrace.c
  index acf110a..c3a31bc 100644
  --- a/os/backtrace.c
  +++ b/os/backtrace.c
  @@ -134,32 +134,25 @@ xorg_backtrace(void)
   size = backtrace(array, BT_SIZE);
   for (i = 0; i  size; i++) {
   int rc = dladdr(array[i], info);
  +const char *name;
  +unsigned int addr;
 
   if (rc == 0) {
   ErrorFSigSafe(%u: ?? [%p]\n, i, array[i]);
   continue;
   }
   mod = (info.dli_fname  *info.dli_fname) ? info.dli_fname :
  (vdso);
  -if (info.dli_saddr)
  -ErrorFSigSafe(
  -%u: %s (%s+0x%x) [%p]\n,
  -i,
  -mod,
  -info.dli_sname,
  -(unsigned int)((char *) array[i] -
  -   (char *) info.dli_saddr),
  -array[i]);
  +
  +if (info.dli_saddr) {
  +name = info.dli_sname;
  +addr = (unsigned int)((char *) array[i] - (char *)
  info.dli_saddr);
  +}
   else {
  -const char *name = symbol_name(array[i], info.dli_fbase);
  -ErrorFSigSafe(
  -%u: %s (%s+0x%x) [%p]\n,
  -i,
  -mod,
  -name,
  -(unsigned int)((char *) array[i] -
  -   (char *) info.dli_fbase),
  -array[i]);
  +name = symbol_name(array[i], info.dli_fbase);
  +addr = (unsigned int)((char *) array[i] - (char *)
  info.dli_fbase);
   }
  +
  +ErrorFSigSafe(%u: %s (%s+0x%x) [%p]\n, i, mod, name, addr,
  array[i]);
   }
   ErrorFSigSafe(\n);
   }
  --
  1.8.3.1
 
  ___
  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
 
 
 
 
 -- 
   Jasper
___
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 4/5] Support backtracing through elfutils (#70746)

2013-10-29 Thread Peter Hutterer
On Tue, Oct 29, 2013 at 10:13:28PM -0400, Jasper St. Pierre wrote:
 I'm not a fan at all. This API is really bad compared to what's provided by
 libbacktrace, which is super simple. This also seem to require callbacks
 that have Linux in the name. Why are we trying to get rid of
 libbacktrace, and what's the schedule for this?

we're getting rid of libunwind, which was merged after 1.14 and isn't
available on e.g. RHEL and apparently not required either. as for
libbacktrace - haven't dealt with it yet, so I can't comment much on it.

schedule - asap, before the 1.15 release would be nice so we don't introduce
a dependency that we don't need.

Cheers,
   Peter

 On Tue, Oct 29, 2013 at 7:25 PM, Peter Hutterer 
 peter.hutte...@who-t.netwrote:
 
  From Jan Kratochvil:
  There is a longterm plan to obsolete libunwind from Fedora by new elfutils
  unwinder.  But xorg-x11-server does not even need any external (non-glibc)
  unwinder.
 
  According to e21e183059df5975e7086850d1931edb2c1bbd06 you do only
  self-backtrace (called local unwinding by libunwind).  glibc backtrace()
  can
  do the same.  According to the sample backtrace in the patch above the
  backtrace addresses there are the same in before/after cases, libunwind
  only
  adds resolving of address - symbol name there, IIUC.
 
  address - symbol name resolving can be done with RH-supported elfutils
  package.
 
  X.Org Bug 70746 http://bugs.freedesktop.org/show_bug.cgi?id=70746
 
  Cc: Marcin Slusarz marcin.slus...@gmail.com
  Cc: Jan Kratochvil jan.kratoch...@redhat.com
  Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
  ---
  This may need some extra linux checks...
 
   configure.ac| 10 --
   include/dix-config.h.in |  3 ++
   os/backtrace.c  | 91
  +++--
   3 files changed, 99 insertions(+), 5 deletions(-)
 
  diff --git a/configure.ac b/configure.ac
  index d36aefc..0e589f8 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -308,6 +308,12 @@ AC_CHECK_HEADER([execinfo.h],[
   ])]
   )
 
  +dnl elfutils for backtrace symbol lookup
  +AC_CHECK_HEADER([elfutils/libdwfl.h],
  +[AC_DEFINE(HAVE_ELFUTILS, 1, [Has elfutils])
  + ELFUTILS_LIBS=-ldw])
  +AC_SUBST(ELFUTILS_LIBS)
  +
   dnl
  ---
   dnl Bus options and CPU capabilities.  Replaces logic in
   dnl hw/xfree86/os-support/bus/Makefile.am, among others.
  @@ -1339,10 +1345,10 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests
  extension])
 
   if test x$SPECIAL_DTRACE_OBJECTS = xyes ; then
 DIX_LIB='$(top_builddir)/dix/dix.O'
  -  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
  +  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)
  $(ELFUTILS_LIBS)'
   else
 DIX_LIB='$(top_builddir)/dix/libdix.la'
  -  OS_LIB='$(top_builddir)/os/libos.la'
  +  OS_LIB='$(top_builddir)/os/libos.la $(ELFUTILS_LIBS)'
   fi
   AC_SUBST([DIX_LIB])
   AC_SUBST([OS_LIB])
  diff --git a/include/dix-config.h.in b/include/dix-config.h.in
  index e1cb9eb..c7c0a8a 100644
  --- a/include/dix-config.h.in
  +++ b/include/dix-config.h.in
  @@ -60,6 +60,9 @@
   /* Has backtrace support */
   #undef HAVE_BACKTRACE
 
  +/* Has elfutils */
  +#undef HAVE_ELFUTILS
  +
   /* Define to 1 if you have the byteswap.h header file. */
   #undef HAVE_BYTESWAP_H
 
  diff --git a/os/backtrace.c b/os/backtrace.c
  index c807bd2..acf110a 100644
  --- a/os/backtrace.c
  +++ b/os/backtrace.c
  @@ -37,6 +37,89 @@
   #include dlfcn.h
   #include execinfo.h
 
  +#ifdef HAVE_ELFUTILS
  +#include unistd.h
  +#include elfutils/libdwfl.h
  +
  +static Dwfl*
  +dwfl_get(void)
  +{
  +static char *debuginfo_path;
  +static Dwfl *dwfl;
  +
  +static const Dwfl_Callbacks proc_callbacks = {
  +.find_debuginfo = dwfl_standard_find_debuginfo,
  +.debuginfo_path = debuginfo_path,
  +.find_elf = dwfl_linux_proc_find_elf,
  +   };
  +
  +if (dwfl)
  +return dwfl;
  +
  +dwfl = dwfl_begin(proc_callbacks);
  +if (!dwfl)
  +return NULL;
  +
  +errno = 0;
  +if (dwfl_linux_proc_report(dwfl, getpid ()) != 0 ||
  +dwfl_report_end(dwfl, NULL, NULL) != 0)
  +{
  +ErrorFSigSafe(dwfl reporting: %s\n, sterror(errno));
  +dwfl_end(dwfl);
  +dwfl = NULL;
  +abort();
  +}
  +
  +return dwfl;
  +}
  +
  +struct getmodules_callback_arg {
  +void *addr;
  +const char *name;
  +};
  +
  +static int
  +getmodules_callback(Dwfl_Module *module,
  +void **userdata,
  +const char *module_name,
  +Dwarf_Addr module_low_addr, void *arg)
  +{
  +struct getmodules_callback_arg *cbarg = arg;
  +cbarg-name = dwfl_module_addrname(module, (GElf_Addr)cbarg-addr);
  +return cbarg-name ? DWARF_CB_ABORT : DWARF_CB_OK;
  +}
  +
  +static const char*
  +addr_lookup(void *addr)
  +{
  +

Re: [PULL] dmx cursor jump, missing motion events, kdrive crasher

2013-10-29 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes:

 Gaetan Nadon (1):
   config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES

 Peter Hutterer (2):
   Xi: fix logic error when calculating emulated motion events
   dmx: queue button events with a flags of 0

 Strake (1):
   unbreak KdEnableInput

Merged.
   04ab07c..1470c0a  master - master

-- 
keith.pack...@intel.com


pgpzySRJZLuOC.pgp
Description: PGP signature
___
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:xkbcomp 3/4] Convert remaining sprintf calls to snprintf

2013-10-29 Thread Alan Coopersmith

On 10/29/13 07:22 PM, Jasper St. Pierre wrote:

You do know you can implement an asprintf-alike using vsnprintf, right?


Yeah, I think it's safe to say I know that:

http://cgit.freedesktop.org/xorg/app/xrdb/commit/?id=82babf3ecfd6eb1ef65a150fb0c453e7bfd61616
http://cgit.freedesktop.org/xorg/xserver/commit/?id=c95c1d338fdb62dbe3dba934b97324fa778b7fce
http://cgit.freedesktop.org/xorg/lib/libXt/commit/?id=ac07da253415ccb8b6322feedf7969967357050e
http://cgit.freedesktop.org/xorg/app/xmodmap/commit/?id=d0dfd2128e6111b967c51136d97093d3b53ee6d6

I just didn't think it was worth the effort in this patch to add one - maybe
later, once the XKB *alloc calls are converted to standard C ones.

--
-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:xkbcomp 3/4] Convert remaining sprintf calls to snprintf

2013-10-29 Thread Jasper St. Pierre
Sure, then:

Reviewed-by: Jasper St. Pierre jstpie...@mecheye.net


On Wed, Oct 30, 2013 at 12:21 AM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 On 10/29/13 07:22 PM, Jasper St. Pierre wrote:

 You do know you can implement an asprintf-alike using vsnprintf, right?


 Yeah, I think it's safe to say I know that:

 http://cgit.freedesktop.org/**xorg/app/xrdb/commit/?id=**
 82babf3ecfd6eb1ef65a150fb0c453**e7bfd61616http://cgit.freedesktop.org/xorg/app/xrdb/commit/?id=82babf3ecfd6eb1ef65a150fb0c453e7bfd61616
 http://cgit.freedesktop.org/**xorg/xserver/commit/?id=**
 c95c1d338fdb62dbe3dba934b97324**fa778b7fcehttp://cgit.freedesktop.org/xorg/xserver/commit/?id=c95c1d338fdb62dbe3dba934b97324fa778b7fce
 http://cgit.freedesktop.org/**xorg/lib/libXt/commit/?id=**
 ac07da253415ccb8b6322feedf7969**967357050ehttp://cgit.freedesktop.org/xorg/lib/libXt/commit/?id=ac07da253415ccb8b6322feedf7969967357050e
 http://cgit.freedesktop.org/**xorg/app/xmodmap/commit/?id=**
 d0dfd2128e6111b967c51136d97093**d3b53ee6d6http://cgit.freedesktop.org/xorg/app/xmodmap/commit/?id=d0dfd2128e6111b967c51136d97093d3b53ee6d6

 I just didn't think it was worth the effort in this patch to add one -
 maybe
 later, once the XKB *alloc calls are converted to standard C ones.

 --
 -Alan Coopersmith-  alan.coopersm...@oracle.com
  Oracle Solaris Engineering - http://blogs.oracle.com/alanc




-- 
  Jasper
___
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 2/2] Replace malloc(strlen)+strcpy/strcat calls with strdup

2013-10-29 Thread Alan Coopersmith
On 10/29/13 07:07 PM, Jasper St. Pierre wrote:
 +#define FontFileSaveString(s) strdup(s)
 
 Shouldn't this #define be in a header file to be useful?

All the calls to that function in libXfont appear in that file after
the point of the #define:

% git grep FontFileSaveString
include/X11/fonts/fntfil.h:extern char * FontFileSaveString ( char *s );
src/fontfile/fontdir.c:FontFileSaveString (char *s)
src/fontfile/fontdir.c:#define FontFileSaveString(s) strdup(s)
src/fontfile/fontdir.c: if (!(entry.u.bitmap.fileName = FontFileSaveString 
(fileName)))
src/fontfile/fontdir.c: if (!(existing-u.scalable.fileName = 
FontFileSaveString (fileName)))
src/fontfile/fontdir.c: if (!(entry.u.scalable.fileName = FontFileSaveString 
(fileName)))
src/fontfile/fontdir.c:if (!(entry.u.alias.resolved = FontFileSaveString 
(fontName)))

Still need to go through the programs that call libXfont to see if we
can safely drop this from the API or not, but this is one step forward
in the meantime.

-- 
-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