summaryrefslogtreecommitdiff
path: root/lib/libXfixes/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-05-31 14:57:06 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-05-31 14:57:06 +0000
commiteb88489dbddc2a99979f2554aade8934c17ebcff (patch)
tree73a6e7f3fc1b5a926f8d6c1b4ee9bc711e68beb1 /lib/libXfixes/src
parent132c244cea98b7967fe514014b93f1c5fe105278 (diff)
Update to libXfixes 5.0.1
Diffstat (limited to 'lib/libXfixes/src')
-rw-r--r--lib/libXfixes/src/Makefile.am7
-rw-r--r--lib/libXfixes/src/Makefile.in13
-rw-r--r--lib/libXfixes/src/Region.c10
-rw-r--r--lib/libXfixes/src/SaveSet.c2
-rw-r--r--lib/libXfixes/src/Selection.c2
-rw-r--r--lib/libXfixes/src/Xfixes.c26
-rw-r--r--lib/libXfixes/src/Xfixesint.h16
7 files changed, 43 insertions, 33 deletions
diff --git a/lib/libXfixes/src/Makefile.am b/lib/libXfixes/src/Makefile.am
index 544230fe0..4e3f542d2 100644
--- a/lib/libXfixes/src/Makefile.am
+++ b/lib/libXfixes/src/Makefile.am
@@ -8,13 +8,12 @@ libXfixes_la_SOURCES = \
Xfixes.c \
Xfixesint.h
-libXfixes_la_LIBADD = @FIXESEXT_LIBS@
AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
+AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions
-INCLUDES = -I$(top_srcdir)/include/X11/extensions
-
+libXfixes_la_LIBADD = @FIXESEXT_LIBS@
libXfixes_la_LDFLAGS = -version-number 3:1:0 -no-undefined
libXfixesincludedir = $(includedir)/X11/extensions
-libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
+libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
diff --git a/lib/libXfixes/src/Makefile.in b/lib/libXfixes/src/Makefile.in
index e2b2ae706..676a1b150 100644
--- a/lib/libXfixes/src/Makefile.in
+++ b/lib/libXfixes/src/Makefile.in
@@ -204,7 +204,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
@@ -295,17 +294,17 @@ libXfixes_la_SOURCES = \
Xfixes.c \
Xfixesint.h
-libXfixes_la_LIBADD = @FIXESEXT_LIBS@
AM_CFLAGS = $(CWARNFLAGS) @FIXESEXT_CFLAGS@
-INCLUDES = -I$(top_srcdir)/include/X11/extensions
+AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions
+libXfixes_la_LIBADD = @FIXESEXT_LIBS@
libXfixes_la_LDFLAGS = -version-number 3:1:0 -no-undefined
libXfixesincludedir = $(includedir)/X11/extensions
-libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
+libXfixesinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xfixes.h
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -330,9 +329,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
diff --git a/lib/libXfixes/src/Region.c b/lib/libXfixes/src/Region.c
index a20474a54..cb0cf6e09 100644
--- a/lib/libXfixes/src/Region.c
+++ b/lib/libXfixes/src/Region.c
@@ -303,8 +303,8 @@ XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet)
}
XRectangle *
-XFixesFetchRegionAndBounds (Display *dpy,
- XserverRegion region,
+XFixesFetchRegionAndBounds (Display *dpy,
+ XserverRegion region,
int *nrectanglesRet,
XRectangle *bounds)
{
@@ -335,7 +335,6 @@ XFixesFetchRegionAndBounds (Display *dpy,
bounds->height = rep.height;
nbytes = (long) rep.length << 2;
nrects = rep.length >> 1;
- nread = nrects << 3;
rects = Xmalloc (nrects * sizeof (XRectangle));
if (!rects)
{
@@ -344,7 +343,8 @@ XFixesFetchRegionAndBounds (Display *dpy,
SyncHandle ();
return NULL;
}
- _XRead16 (dpy, (short *) rects, nrects << 3);
+ nread = nrects << 3;
+ _XRead16 (dpy, (short *) rects, nread);
/* skip any padding */
if(nbytes > nread)
{
@@ -357,7 +357,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
}
void
-XFixesSetGCClipRegion (Display *dpy, GC gc,
+XFixesSetGCClipRegion (Display *dpy, GC gc,
int clip_x_origin, int clip_y_origin,
XserverRegion region)
{
diff --git a/lib/libXfixes/src/SaveSet.c b/lib/libXfixes/src/SaveSet.c
index c57ae7321..cf050a0fd 100644
--- a/lib/libXfixes/src/SaveSet.c
+++ b/lib/libXfixes/src/SaveSet.c
@@ -26,7 +26,7 @@
#endif
#include "Xfixesint.h"
-void
+void
XFixesChangeSaveSet (Display *dpy, Window win, int mode, int target, int map)
{
XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
diff --git a/lib/libXfixes/src/Selection.c b/lib/libXfixes/src/Selection.c
index 708d58350..7f4769ccb 100644
--- a/lib/libXfixes/src/Selection.c
+++ b/lib/libXfixes/src/Selection.c
@@ -29,7 +29,7 @@
void
XFixesSelectSelectionInput (Display *dpy,
Window win,
- Atom selection,
+ Atom selection,
unsigned long eventMask)
{
XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
diff --git a/lib/libXfixes/src/Xfixes.c b/lib/libXfixes/src/Xfixes.c
index 7d3af84df..c32ee3966 100644
--- a/lib/libXfixes/src/Xfixes.c
+++ b/lib/libXfixes/src/Xfixes.c
@@ -31,7 +31,7 @@ char XFixesExtensionName[] = XFIXES_NAME;
static int
XFixesCloseDisplay (Display *dpy, XExtCodes *codes);
-
+
static Bool
XFixesWireToEvent(Display *dpy, XEvent *event, xEvent *wire);
@@ -57,13 +57,13 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
info->codes = XInitExtension (dpy, ext_name);
/*
- * if the server has the extension, then we can initialize the
+ * if the server has the extension, then we can initialize the
* appropriate function vectors
*/
if (info->codes) {
xXFixesQueryVersionReply rep;
xXFixesQueryVersionReq *req;
- XESetCloseDisplay (dpy, info->codes->extension,
+ XESetCloseDisplay (dpy, info->codes->extension,
XFixesCloseDisplay);
for (ev = info->codes->first_event;
ev < info->codes->first_event + XFixesNumberEvents;
@@ -81,7 +81,7 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
req->xfixesReqType = X_XFixesQueryVersion;
req->majorVersion = XFIXES_MAJOR;
req->minorVersion = XFIXES_MINOR;
- if (!_XReply (dpy, (xReply *) &rep, 0, xTrue))
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue))
{
UnlockDisplay (dpy);
SyncHandle ();
@@ -123,7 +123,7 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
* XFixesExtRemoveDisplay - remove the indicated display from the
* extension object. (Replaces XextRemoveDisplay.)
*/
-static int
+static int
XFixesExtRemoveDisplay (XFixesExtInfo *extinfo, Display *dpy)
{
XFixesExtDisplayInfo *info, *prev;
@@ -164,7 +164,7 @@ XFixesExtRemoveDisplay (XFixesExtInfo *extinfo, Display *dpy)
* XextFindDisplay.)
*/
static XFixesExtDisplayInfo *
-XFixesExtFindDisplay (XFixesExtInfo *extinfo,
+XFixesExtFindDisplay (XFixesExtInfo *extinfo,
Display *dpy)
{
XFixesExtDisplayInfo *info;
@@ -172,7 +172,7 @@ XFixesExtFindDisplay (XFixesExtInfo *extinfo,
/*
* see if this was the most recently accessed display
*/
- if ((info = extinfo->cur) && info->display == dpy)
+ if ((info = extinfo->cur) && info->display == dpy)
return info;
/*
@@ -198,11 +198,11 @@ XFixesFindDisplay (Display *dpy)
info = XFixesExtFindDisplay (&XFixesExtensionInfo, dpy);
if (!info)
- info = XFixesExtAddDisplay (&XFixesExtensionInfo, dpy,
+ info = XFixesExtAddDisplay (&XFixesExtensionInfo, dpy,
XFixesExtensionName);
return info;
}
-
+
static int
XFixesCloseDisplay (Display *dpy, XExtCodes *codes)
{
@@ -296,24 +296,24 @@ XFixesEventToWire(Display *dpy, XEvent *event, xEvent *wire)
return False;
}
-Bool
+Bool
XFixesQueryExtension (Display *dpy,
int *event_base_return,
int *error_base_return)
{
XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
- if (XFixesHasExtension(info))
+ if (XFixesHasExtension(info))
{
*event_base_return = info->codes->first_event;
*error_base_return = info->codes->first_error;
return True;
- }
+ }
else
return False;
}
-Status
+Status
XFixesQueryVersion (Display *dpy,
int *major_version_return,
int *minor_version_return)
diff --git a/lib/libXfixes/src/Xfixesint.h b/lib/libXfixes/src/Xfixesint.h
index bd79227be..5ac60faff 100644
--- a/lib/libXfixes/src/Xfixesint.h
+++ b/lib/libXfixes/src/Xfixesint.h
@@ -31,8 +31,6 @@
#include "Xfixes.h"
#include <X11/extensions/xfixesproto.h>
-extern char XFixesExtensionName[];
-
typedef struct _XFixesExtDisplayInfo {
struct _XFixesExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
@@ -76,4 +74,18 @@ static inline void _XEatDataWords(Display *dpy, unsigned long n)
}
#endif
+#ifndef HAVE__XEATDATAWORDS
+#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */
+#include <limits.h>
+
+static inline void _XEatDataWords(Display *dpy, unsigned long n)
+{
+# ifndef LONG64
+ if (n >= (ULONG_MAX >> 2))
+ _XIOError(dpy);
+# endif
+ _XEatData (dpy, n << 2);
+}
+#endif
+
#endif /* _XFIXESINT_H_ */