summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 17:22:00 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 17:22:00 +0900
commitab1aa32ba3f92dea2c2ee140e7a1c4ac7bdba528 (patch)
tree4bb3261650bfa0f40dbe382661f289d570405c8b
parent0c3eeeaa8e30ced3c80b6794f71b063b3a50400f (diff)
downloadlibxfixes-accepted/tizen_2.4_mobile.tar.gz
libxfixes-accepted/tizen_2.4_mobile.tar.bz2
libxfixes-accepted/tizen_2.4_mobile.zip
-rw-r--r--.gitignore78
-rw-r--r--Makefile.am6
-rwxr-xr-xautogen.sh14
-rw-r--r--configure.ac10
-rw-r--r--include/X11/extensions/Xfixes.h6
-rw-r--r--man/Xfixes.man6
-rw-r--r--packaging/baselibs.conf1
-rw-r--r--packaging/libXfixes.changes6
-rw-r--r--packaging/libXfixes.manifest5
-rw-r--r--packaging/libXfixes.spec4
-rw-r--r--src/Cursor.c34
-rw-r--r--src/Makefile.am7
-rw-r--r--src/Region.c12
-rw-r--r--src/SaveSet.c2
-rw-r--r--src/Selection.c2
-rw-r--r--src/Xfixes.c26
-rw-r--r--src/Xfixesint.h16
17 files changed, 181 insertions, 54 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..97b369f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for libXfixes
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/Makefile.am b/Makefile.am
index d6a90e3..b5d567d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright © 2003 Keith Packard, Noah Levitt
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
# specific, written prior permission. Keith Packard makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..fc34bd5
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/configure.ac b/configure.ac
index fc8c1e1..f85bd72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,14 +32,13 @@ AC_PREREQ([2.60])
# that 'revision' number appears in Xfixes.h and has to be manually
# synchronized.
#
-AC_INIT(libXfixes, [5.0],
+AC_INIT(libXfixes, [5.0.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfixes])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
# Initialize libtool
AC_PROG_LIBTOOL
@@ -58,6 +57,13 @@ AC_SUBST(FIXESEXT_VERSION)
# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto x11)
+# Check for _XEatDataWords function that may be patched into older Xlib releases
+SAVE_LIBS="$LIBS"
+LIBS="$FIXESEXT_LIBS"
+AC_CHECK_FUNCS([_XEatDataWords])
+LIBS="$SAVE_LIBS"
+
+
AC_CONFIG_FILES([Makefile
src/Makefile
man/Makefile
diff --git a/include/X11/extensions/Xfixes.h b/include/X11/extensions/Xfixes.h
index 10a7e2e..8995d14 100644
--- a/include/X11/extensions/Xfixes.h
+++ b/include/X11/extensions/Xfixes.h
@@ -133,7 +133,7 @@ XFixesChangeSaveSet (Display *dpy,
void
XFixesSelectSelectionInput (Display *dpy,
Window win,
- Atom selection,
+ Atom selection,
unsigned long eventMask);
void
@@ -198,12 +198,12 @@ XRectangle *
XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);
XRectangle *
-XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,
+XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,
int *nrectanglesRet,
XRectangle *bounds);
void
-XFixesSetGCClipRegion (Display *dpy, GC gc,
+XFixesSetGCClipRegion (Display *dpy, GC gc,
int clip_x_origin, int clip_y_origin,
XserverRegion region);
diff --git a/man/Xfixes.man b/man/Xfixes.man
index 075b78f..e356838 100644
--- a/man/Xfixes.man
+++ b/man/Xfixes.man
@@ -31,9 +31,9 @@
XFixes \- Augmented versions of core protocol requests
.SH SYNTAX
\&#include <X11/extensions/Xfixes.h>
-.nf
+.nf
.sp
-Bool XFixesQueryExtension \^(\^Display *\fIdpy\fP,
+Bool XFixesQueryExtension \^(\^Display *\fIdpy\fP,
int *\fIevent_base_return\fP, int *\fIerror_base_return\fP\^);
.sp
Status XFixesQueryVersion \^(\^Display *\fIdpy\fP,
@@ -69,7 +69,7 @@ Extension. This extension provides application with work arounds for
various limitations in the core protocol.
.SH RESTRICTIONS
.B Xfixes
-will remain upward compatible after the current 1.0 release.
+will remain upward compatible after the 1.0 release.
.SH AUTHORS
Keith Packard, member of the XFree86 Project, Inc. and
HP, Owen Taylor, member of the Gnome Foundation and Redhat, Inc.
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644
index 0000000..b81dde2
--- /dev/null
+++ b/packaging/baselibs.conf
@@ -0,0 +1 @@
+libXfixes
diff --git a/packaging/libXfixes.changes b/packaging/libXfixes.changes
new file mode 100644
index 0000000..f4afb55
--- /dev/null
+++ b/packaging/libXfixes.changes
@@ -0,0 +1,6 @@
+* Mon Mar 18 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130204.203516@947c0db
+- Fixed package groups
+
+* Mon Feb 04 2013 Anas Nashif <anas.nashif@intel.com> upstream/5.0@2ff888d
+- Add multi-lib support
+
diff --git a/packaging/libXfixes.manifest b/packaging/libXfixes.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/libXfixes.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/libXfixes.spec b/packaging/libXfixes.spec
index c14fd97..ed408c7 100644
--- a/packaging/libXfixes.spec
+++ b/packaging/libXfixes.spec
@@ -1,6 +1,6 @@
Summary: X Fixes library
Name: libXfixes
-Version: 5.0
+Version: 5.0.1
Release: 2
License: MIT
Group: System Environment/Libraries
@@ -62,4 +62,4 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/X11/extensions/Xfixes.h
%{_libdir}/libXfixes.so
%{_libdir}/pkgconfig/xfixes.pc
-#%{_mandir}/man3/Xfixes.3*
+#%{_mandir}/man3/Xfixes.3* \ No newline at end of file
diff --git a/src/Cursor.c b/src/Cursor.c
index 0d656f7..33590b7 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -47,6 +47,7 @@
#include <config.h>
#endif
#include "Xfixesint.h"
+#include <limits.h>
void
XFixesSelectCursorInput (Display *dpy,
@@ -74,9 +75,9 @@ XFixesGetCursorImage (Display *dpy)
XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
xXFixesGetCursorImageAndNameReq *req;
xXFixesGetCursorImageAndNameReply rep;
- int npixels;
- int nbytes_name;
- int nbytes, nread, rlength;
+ size_t npixels;
+ size_t nbytes_name;
+ size_t nbytes, nread, rlength;
XFixesCursorImage *image;
char *name;
@@ -101,19 +102,24 @@ XFixesGetCursorImage (Display *dpy)
}
npixels = rep.width * rep.height;
nbytes_name = rep.nbytes;
- /* reply data length */
- nbytes = (long) rep.length << 2;
- /* bytes of actual data in the reply */
- nread = (npixels << 2) + nbytes_name;
- /* size of data returned to application */
- rlength = (sizeof (XFixesCursorImage) +
- npixels * sizeof (unsigned long) +
- nbytes_name + 1);
+ if ((rep.length < (INT_MAX >> 2)) &&
+ npixels < (((INT_MAX >> 3) - sizeof (XFixesCursorImage) - 1)
+ - nbytes_name)) {
+ /* reply data length */
+ nbytes = (size_t) rep.length << 2;
+ /* bytes of actual data in the reply */
+ nread = (npixels << 2) + nbytes_name;
+ /* size of data returned to application */
+ rlength = (sizeof (XFixesCursorImage) +
+ npixels * sizeof (unsigned long) +
+ nbytes_name + 1);
- image = (XFixesCursorImage *) Xmalloc (rlength);
+ image = Xmalloc (rlength);
+ } else
+ image = NULL;
if (!image)
{
- _XEatData (dpy, nbytes);
+ _XEatDataWords(dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
@@ -191,7 +197,7 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
_XReadPad(dpy, name, (long)rep.nbytes);
name[rep.nbytes] = '\0';
} else {
- _XEatData(dpy, (unsigned long) (rep.nbytes + 3) & ~3);
+ _XEatDataWords(dpy, rep.length);
name = (char *) NULL;
}
UnlockDisplay(dpy);
diff --git a/src/Makefile.am b/src/Makefile.am
index 544230f..4e3f542 100644
--- a/src/Makefile.am
+++ b/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/src/Region.c b/src/Region.c
index 842da06..cb0cf6e 100644
--- a/src/Region.c
+++ b/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,16 +335,16 @@ 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)
{
- _XEatData (dpy, nbytes);
+ _XEatDataWords(dpy, rep.length);
UnlockDisplay (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/src/SaveSet.c b/src/SaveSet.c
index c57ae73..cf050a0 100644
--- a/src/SaveSet.c
+++ b/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/src/Selection.c b/src/Selection.c
index 708d583..7f4769c 100644
--- a/src/Selection.c
+++ b/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/src/Xfixes.c b/src/Xfixes.c
index 7d3af84..c32ee39 100644
--- a/src/Xfixes.c
+++ b/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/src/Xfixesint.h b/src/Xfixesint.h
index 2ee17bc..7bf5bfd 100644
--- a/src/Xfixesint.h
+++ b/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 */
@@ -62,4 +60,18 @@ XFixesFindDisplay (Display *dpy);
#define XFixesSimpleCheckExtension(dpy,i) \
if (!XFixesHasExtension(i)) { return; }
+#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_ */