COPYING | 23 ++++++++ autogen.sh | 4 + configure.ac | 6 +- man/XtAddActions.man | 63 ----------------------- man/XtAddCallback.man | 63 ----------------------- man/XtAddEventHandler.man | 63 ----------------------- man/XtAddExposureToRegion.man | 63 ----------------------- man/XtAddGrab.man | 63 ----------------------- man/XtAddInput.man | 63 ----------------------- man/XtAllocateGC.man | 63 ----------------------- man/XtAppAddActionHook.man | 63 ----------------------- man/XtAppAddActions.man | 63 ----------------------- man/XtAppAddBlockHook.man | 63 ----------------------- man/XtAppAddConverter.man | 63 ----------------------- man/XtAppAddInput.man | 63 ----------------------- man/XtAppAddSignal.man | 63 ----------------------- man/XtAppAddTimeOut.man | 63 ----------------------- man/XtAppAddWorkProc.man | 63 ----------------------- man/XtAppCreateShell.man | 64 ----------------------- man/XtAppError.man | 63 ----------------------- man/XtAppErrorMsg.man | 63 ----------------------- man/XtAppGetErrorDatabase.man | 63 ----------------------- man/XtAppGetSelectionTimeout.man | 63 ----------------------- man/XtAppInitialize.man | 63 ----------------------- man/XtAppLock.man | 63 ----------------------- man/XtAppNextEvent.man | 63 ----------------------- man/XtAppReleaseCacheRefs.man | 63 ----------------------- man/XtAppSetExitFlag.man | 63 ----------------------- man/XtAppSetFallbackResources.man | 63 ----------------------- man/XtAppSetTypeConverter.man | 63 ----------------------- man/XtBuildEventMask.man | 63 ----------------------- man/XtCallAcceptFocus.man | 63 ----------------------- man/XtCallActionProc.man | 63 ----------------------- man/XtCallCallbacks.man | 63 ----------------------- man/XtClass.man | 63 ----------------------- man/XtConfigureWidget.man | 63 ----------------------- man/XtConvert.man | 63 ----------------------- man/XtConvertAndStore.man | 63 ----------------------- man/XtCreateApplicationContext.man | 63 ----------------------- man/XtCreateApplicationShell.man | 63 ----------------------- man/XtCreatePopupShell.man | 63 ----------------------- man/XtCreateSelectionRequest.man | 63 ----------------------- man/XtCreateWidget.man | 63 ----------------------- man/XtCreateWindow.man | 63 ----------------------- man/XtDisplay.man | 63 ----------------------- man/XtDisplayInitialize.man | 63 ----------------------- man/XtDisplayStringConversionWarning.man | 63 ----------------------- man/XtDisplayToApplicationContext.man | 63 ----------------------- man/XtError.man | 63 ----------------------- man/XtErrorMsg.man | 63 ----------------------- man/XtFindFile.man | 63 ----------------------- man/XtGetActionKeysym.man | 63 ----------------------- man/XtGetActionList.man | 63 ----------------------- man/XtGetApplicationNameAndClass.man | 63 ----------------------- man/XtGetApplicationResources.man | 63 ----------------------- man/XtGetClassExtension.man | 63 ----------------------- man/XtGetDisplays.man | 63 ----------------------- man/XtGetErrorDatabase.man | 63 ----------------------- man/XtGetGC.man | 63 ----------------------- man/XtGetKeyboardFocusWidget.man | 63 ----------------------- man/XtGetKeysymTable.man | 63 ----------------------- man/XtGetResourceList.man | 63 ----------------------- man/XtGetSelectionParameters.man | 63 ----------------------- man/XtGetSelectionRequest.man | 63 ----------------------- man/XtGetSelectionTimeout.man | 63 ----------------------- man/XtGetSelectionValue.man | 63 ----------------------- man/XtGetSelectionValueIncremental.man | 63 ----------------------- man/XtGetSubresources.man | 63 ----------------------- man/XtGrabKey.man | 63 ----------------------- man/XtHooksOfDisplay.man | 63 ----------------------- man/XtInitialize.man | 63 ----------------------- man/XtInitializeWidgetClass.man | 63 ----------------------- man/XtInsertEventTypeHandler.man | 63 ----------------------- man/XtLastEventProcessed.man | 63 ----------------------- man/XtMakeGeometryRequest.man | 63 ----------------------- man/XtMalloc.man | 63 ----------------------- man/XtManageChildren.man | 63 ----------------------- man/XtMapWidget.man | 63 ----------------------- man/XtName.man | 63 ----------------------- man/XtNameToWidget.man | 63 ----------------------- man/XtNextEvent.man | 63 ----------------------- man/XtOffset.man | 63 ----------------------- man/XtOpenApplication.man | 63 ----------------------- man/XtOwnSelection.man | 63 ----------------------- man/XtParent.man | 63 ----------------------- man/XtParseAcceleratorTable.man | 63 ----------------------- man/XtParseTranslationTable.man | 63 ----------------------- man/XtPopdown.man | 70 +------------------------ man/XtPopup.man | 63 ----------------------- man/XtProcessLock.man | 63 ----------------------- man/XtQueryGeometry.man | 63 ----------------------- man/XtRealizeWidget.man | 63 ----------------------- man/XtRegisterDrawable.man | 63 ----------------------- man/XtRegisterGrabAction.man | 63 ----------------------- man/XtReservePropertyAtom.man | 63 ----------------------- man/XtResolvePathname.man | 63 ----------------------- man/XtSessionGetToken.man | 63 ----------------------- man/XtSetArg.man | 75 +-------------------------- man/XtSetKeyTranslator.man | 63 ----------------------- man/XtSetKeyboardFocus.man | 63 ----------------------- man/XtSetLanguageProc.man | 63 ----------------------- man/XtSetMultiClickTime.man | 63 ----------------------- man/XtSetSelectionParameters.man | 63 ----------------------- man/XtSetSensitive.man | 63 ----------------------- man/XtSetValues.man | 63 ----------------------- man/XtSetWMColormapWindows.man | 63 ----------------------- man/XtStringConversionWarning.man | 63 ----------------------- man/XtToolkitThreadInitialize.man | 63 ----------------------- man/XtTranslateCoords.man | 63 ----------------------- man/XtVaCreateArgsList.man | 63 ----------------------- src/Converters.c | 13 ---- src/Display.c | 7 -- src/Intrinsic.c | 31 ----------- src/Makefile.am | 6 +- src/NextEvent.c | 3 - src/ResConfig.c | 50 +++++++++--------- src/Selection.c | 84 +++++++++++++++++-------------- src/TMparse.c | 17 ------ src/Vendor.c | 20 ------- src/sharedlib.c | 2 test/Makefile.am | 2 xt.pc.in | 2 122 files changed, 231 insertions(+), 6800 deletions(-)
New commits: commit e83d6d66ea28b0aaa7e574dd2471121a5250b934 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Thu May 30 18:13:27 2013 -0700 libXt 1.1.4 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/configure.ac b/configure.ac index bc92fd8..3f82427 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXt], [1.1.3], +AC_INIT([libXt], [1.1.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXt]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit 1f4802b745aa172d375cb79403cb1e013e6aa4c0 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Sat Mar 9 13:33:20 2013 -0800 Remove old strtoul workaround for SunOS 4 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/ResConfig.c b/src/ResConfig.c index 1f3edbe..161366a 100644 --- a/src/ResConfig.c +++ b/src/ResConfig.c @@ -72,13 +72,6 @@ static void _search_child(Widget, char *, char *, char *, char *, char, char *); static void _set_and_search(Widget, char *, char *, char *, char *, char , char *); static int _locate_children(Widget, Widget **); -#if defined(sun) && !defined(SVR4) -# define Strtoul(a,b,c) (unsigned long)strtol(a,b,c) -#else -# define Strtoul(a,b,c) strtoul(a,b,c) -#endif - - /* * NAME: _set_resource_values * @@ -974,7 +967,7 @@ _XtResourceConfigurationEH ( char *data_end = data + nitems; char *data_value; - resource_len = Strtoul ((void *)data, &data_ptr, 10); + resource_len = strtoul (data, &data_ptr, 10); if (data_ptr != (char *) data) { data_ptr++; commit 9264a21b688891dbdcee630ff72cf39aa75fc4e1 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Sat Mar 9 11:44:14 2013 -0800 unvalidated length in _XtResourceConfigurationEH [CVE-2013-2002] The RCM_DATA property is expected to be in the format: resource_length, resource, value If the property contains a resource_length thats results in a pointer outside the property string, memory corruption can occur. Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/ResConfig.c b/src/ResConfig.c index 68da536..1f3edbe 100644 --- a/src/ResConfig.c +++ b/src/ResConfig.c @@ -971,26 +971,37 @@ _XtResourceConfigurationEH ( * resource and value fields. */ if (data) { + char *data_end = data + nitems; + char *data_value; + resource_len = Strtoul ((void *)data, &data_ptr, 10); - data_ptr++; - data_ptr[resource_len] = '\0'; + if (data_ptr != (char *) data) { + data_ptr++; + data_value = data_ptr + resource_len; + } else /* strtoul failed to convert a number */ + data_ptr = data_value = NULL; + + if (data_value > data_ptr && data_value < data_end) { + *data_value++ = '\0'; - resource = XtNewString (data_ptr); - value = XtNewString (&data_ptr[resource_len + 1]); + resource = XtNewString (data_ptr); + value = XtNewString (data_value); #ifdef DEBUG - fprintf (stderr, "resource_len=%d\n",resource_len); - fprintf (stderr, "resource = %s\t value = %s\n", - resource, value); + fprintf (stderr, "resource_len=%d\n" + resource_len); + fprintf (stderr, "resource = %s\t value = %s\n", + resource, value); #endif - /* - * descend the application widget tree and - * apply the value to the appropriate widgets - */ - _search_widget_tree (w, resource, value); - - XtFree (resource); - XtFree (value); + /* + * descend the application widget tree and + * apply the value to the appropriate widgets + */ + _search_widget_tree (w, resource, value); + + XtFree (resource); + XtFree (value); + } } } commit eae57493feec958bcf733ad0d334715107029f8b Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Sat Mar 9 11:29:21 2013 -0800 Unchecked return values of XGetWindowProperty [CVE-2013-2005] Multiple functions in Selection.c assumed that XGetWindowProperty() would always set the pointer to the property, but before libX11 1.6, it could fail to do so in some cases, leading to libXt freeing or operating on an uninitialized pointer value, so libXt should always initialize the pointers and check for failure itself. Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/Selection.c b/src/Selection.c index f35cb44..4f59d70 100644 --- a/src/Selection.c +++ b/src/Selection.c @@ -839,14 +839,16 @@ static void HandleSelectionEvents( IndirectPair *p; int format; unsigned long bytesafter, length; - unsigned char *value; + unsigned char *value = NULL; ev.property = event->xselectionrequest.property; StartProtectedSection(ev.display, ev.requestor); - (void) XGetWindowProperty(ev.display, ev.requestor, + if (XGetWindowProperty(ev.display, ev.requestor, event->xselectionrequest.property, 0L, 1000000, False,(Atom)AnyPropertyType, &target, &format, &length, - &bytesafter, &value); - count = BYTELENGTH(length, format) / sizeof(IndirectPair); + &bytesafter, &value) == Success) + count = BYTELENGTH(length, format) / sizeof(IndirectPair); + else + count = 0; for (p = (IndirectPair *)value; count; p++, count--) { EndProtectedSection(ctx->dpy); if (!GetConversion(ctx, (XSelectionRequestEvent*)event, @@ -1053,9 +1055,10 @@ static Boolean IsINCRtype( if (prop == None) return False; - (void)XGetWindowProperty(XtDisplay(info->widget), window, prop, 0L, 0L, - False, info->ctx->prop_list->incr_atom, - &type, &format, &length, &bytesafter, &value); + if (XGetWindowProperty(XtDisplay(info->widget), window, prop, 0L, 0L, + False, info->ctx->prop_list->incr_atom, &type, + &format, &length, &bytesafter, &value) != Success) + return False; return (type == info->ctx->prop_list->incr_atom); } @@ -1069,7 +1072,6 @@ static void ReqCleanup( { CallBackInfo info = (CallBackInfo)closure; unsigned long bytesafter, length; - char *value; int format; Atom target; @@ -1093,17 +1095,19 @@ static void ReqCleanup( (ev->xproperty.state == PropertyNewValue) && (ev->xproperty.atom == info->property)) { XPropertyEvent *event = (XPropertyEvent *) ev; - (void) XGetWindowProperty(event->display, XtWindow(widget), - event->atom, 0L, 1000000, True, AnyPropertyType, - &target, &format, &length, &bytesafter, - (unsigned char **) &value); - XFree(value); - if (length == 0) { - XtRemoveEventHandler(widget, (EventMask) PropertyChangeMask, FALSE, - ReqCleanup, (XtPointer) info ); - FreeSelectionProperty(XtDisplay(widget), info->property); - XtFree(info->value); /* requestor never got this, so free now */ - FreeInfo(info); + char *value = NULL; + if (XGetWindowProperty(event->display, XtWindow(widget), + event->atom, 0L, 1000000, True, AnyPropertyType, + &target, &format, &length, &bytesafter, + (unsigned char **) &value) == Success) { + XFree(value); + if (length == 0) { + XtRemoveEventHandler(widget, (EventMask) PropertyChangeMask, + FALSE, ReqCleanup, (XtPointer) info ); + FreeSelectionProperty(XtDisplay(widget), info->property); + XtFree(info->value); /* requestor never got this, so free now */ + FreeInfo(info); + } } } } @@ -1121,20 +1125,23 @@ static void ReqTimedOut( unsigned long bytesafter; unsigned long proplength; Atom type; - IndirectPair *pairs; XtPointer *c; int i; if (*info->target == info->ctx->prop_list->indirect_atom) { - (void) XGetWindowProperty(XtDisplay(info->widget), - XtWindow(info->widget), info->property, 0L, - 10000000, True, AnyPropertyType, &type, &format, - &proplength, &bytesafter, (unsigned char **) &pairs); - XFree((char*)pairs); - for (proplength = proplength / IndirectPairWordSize, i = 0, c = info->req_closure; - proplength; proplength--, c++, i++) - (*info->callbacks[i])(info->widget, *c, - &info->ctx->selection, &resulttype, value, &length, &format); + IndirectPair *pairs = NULL; + if (XGetWindowProperty(XtDisplay(info->widget), XtWindow(info->widget), + info->property, 0L, 10000000, True, + AnyPropertyType, &type, &format, &proplength, + &bytesafter, (unsigned char **) &pairs) + == Success) { + XFree(pairs); + for (proplength = proplength / IndirectPairWordSize, i = 0, + c = info->req_closure; + proplength; proplength--, c++, i++) + (*info->callbacks[i])(info->widget, *c, &info->ctx->selection, + &resulttype, value, &length, &format); + } } else { (*info->callbacks[0])(info->widget, *info->req_closure, &info->ctx->selection, &resulttype, value, &length, &format); @@ -1280,12 +1287,13 @@ Boolean HandleNormal( unsigned long length; int format; Atom type; - unsigned char *value; + unsigned char *value = NULL; int number = info->current; - (void) XGetWindowProperty(dpy, XtWindow(widget), property, 0L, - 10000000, False, AnyPropertyType, - &type, &format, &length, &bytesafter, &value); + if (XGetWindowProperty(dpy, XtWindow(widget), property, 0L, 10000000, + False, AnyPropertyType, &type, &format, &length, + &bytesafter, &value) != Success) + return FALSE; if (type == info->ctx->prop_list->incr_atom) { unsigned long size = IncrPropSize(widget, value, format, length); @@ -1370,7 +1378,6 @@ static void HandleSelectionReplies( Display *dpy = event->display; CallBackInfo info = (CallBackInfo) closure; Select ctx = info->ctx; - IndirectPair *pairs, *p; unsigned long bytesafter; unsigned long length; int format; @@ -1385,9 +1392,12 @@ static void HandleSelectionReplies( XtRemoveEventHandler(widget, (EventMask)0, TRUE, HandleSelectionReplies, (XtPointer) info ); if (event->target == ctx->prop_list->indirect_atom) { - (void) XGetWindowProperty(dpy, XtWindow(widget), info->property, 0L, - 10000000, True, AnyPropertyType, &type, &format, - &length, &bytesafter, (unsigned char **) &pairs); + IndirectPair *pairs = NULL, *p; + if (XGetWindowProperty(dpy, XtWindow(widget), info->property, 0L, + 10000000, True, AnyPropertyType, &type, &format, + &length, &bytesafter, (unsigned char **) &pairs) + != Success) + length = 0; for (length = length / IndirectPairWordSize, p = pairs, c = info->req_closure; length; length--, p++, c++, info->current++) { commit ead50a9a274aa96bef94e57c4625be8e9288af4e Author: Colin Walters <walt...@verbum.org> Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/autogen.sh b/autogen.sh index 904cd67..fc34bd5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,6 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode "$@" +if test -z "$NOCONFIGURE"; then + $srcdir/configure "$@" +fi commit 8f5f3f7a3c36088d6faf0f13da4416596257bc58 Author: Adam Jackson <a...@redhat.com> Date: Tue Jan 15 14:28:48 2013 -0500 configure: Remove AM_MAINTAINER_MODE Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/configure.ac b/configure.ac index c59cc26..bc92fd8 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,6 @@ AC_CONFIG_MACRO_DIR([m4]) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Initialize libtool AC_PROG_LIBTOOL commit 6731c2c7e3c16ad17425acfb5024fa1501e94411 Author: Thierry Reding <thierry.red...@avionic-design.de> Date: Thu Jan 3 10:16:56 2013 +0100 Use AM_CPPFLAGS instead of INCLUDES Recent versions of automake deprecate the INCLUDES variable. The same effect can be achieved by using AM_CPPFLAGS instead, which is also automake's recommendation. Signed-off-by: Thierry Reding <thierry.red...@avionic-design.de> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/Makefile.am b/src/Makefile.am index de60cfc..a466ae5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,8 +9,8 @@ ERRORDB_DEFINES = -DERRORDB=\"$(ERRORDBDIR)/XtErrorDB\" AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \ $(XTMALLOC_ZERO_CFLAGS) -INCLUDES = -I$(top_srcdir)/include/ -I$(top_srcdir)/include/X11 \ - -I$(top_builddir)/include -I$(top_builddir)/include/X11 +AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/include/X11 \ + -I$(top_builddir)/include -I$(top_builddir)/include/X11 nodist_libXt_la_SOURCES = StringDefs.c diff --git a/test/Makefile.am b/test/Makefile.am index 7494c41..adc7060 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -5,7 +5,7 @@ check_PROGRAMS = Alloc Converters Event TESTS=$(check_PROGRAMS) AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(GLIB_CFLAGS) -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include LDADD= $(top_builddir)/src/libXt.la $(GLIB_LIBS) TESTS_ENVIRONMENT = $(MALLOC_DEBUG_ENV) commit 97034e393cfa63a55e9cec2d795ac41e5872f5b5 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Fri Jan 4 19:52:59 2013 -0800 unifdef -U__UNIXOS2__ Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/Converters.c b/src/Converters.c index 7649802..8c8d8be 100644 --- a/src/Converters.c +++ b/src/Converters.c @@ -83,13 +83,8 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xlocale.h> #include <errno.h> /* for StringToDirectoryString */ -#ifdef __UNIXOS2__ -#define IsNewline(str) ((str) == '\n' || (str) == '\r') -#define IsWhitespace(str) ((str)== ' ' || (str) == '\t' || (str) == '\r') -#else #define IsNewline(str) ((str) == '\n') #define IsWhitespace(str) ((str)== ' ' || (str) == '\t') -#endif static const String XtNwrongParameters = "wrongParameters"; static const String XtNconversionError = "conversionError"; @@ -122,11 +117,7 @@ static XrmQuark XtQGravity; static XrmQuark XtQInt; static XrmQuark XtQPixel; static XrmQuark XtQPosition; -#ifdef __UNIXOS2__ -XrmQuark _XtQString = 0; -#else XrmQuark _XtQString; -#endif void _XtConvertInitialize(void) { @@ -270,11 +261,7 @@ static Boolean IsInteger( int val = 0; char ch; /* skip leading whitespace */ -#ifndef __UNIXOS2__ while ((ch = *string) == ' ' || ch == '\t') string++; -#else - while ((ch = *string) == ' ' || ch == '\t' || ch == '\r') string++; -#endif while ((ch = *string++)) { if (ch >= '0' && ch <= '9') { val *= 10; diff --git a/src/Display.c b/src/Display.c index 4ccf079..0971735 100644 --- a/src/Display.c +++ b/src/Display.c @@ -274,13 +274,6 @@ Display *XtOpenDisplay( #else char *ptr = strrchr(argv[0], '/'); #endif -#ifdef __UNIXOS2__ - char *dot_ptr,*ptr2; - ptr2 = strrchr(argv[0],'\\'); - if (ptr2 > ptr) ptr = ptr2; - dot_ptr = strrchr(argv[0],'.'); - if (dot_ptr && (dot_ptr > ptr)) *dot_ptr='\0'; -#endif /* This will remove the .exe suffix under OS/2 */ if (ptr) applName = ++ptr; else applName = argv[0]; diff --git a/src/Intrinsic.c b/src/Intrinsic.c index 3df0358..29bf716 100644 --- a/src/Intrinsic.c +++ b/src/Intrinsic.c @@ -888,10 +888,6 @@ static int AccessFile ( /* try the places set in the environment */ drive = getenv ("_XBASEDRIVE"); -#ifdef __UNIXOS2__ - if (!drive) - drive = getenv ("X11ROOT"); -#endif if (!drive) drive = "C:"; len = strlen (drive) + strlen (path); @@ -903,7 +899,6 @@ static int AccessFile ( return 1; } -#ifndef __UNIXOS2__ /* one last place to look */ drive = getenv ("HOMEDRIVE"); if (drive) { @@ -936,7 +931,6 @@ static int AccessFile ( } } } -#endif return 0; } #endif @@ -1092,21 +1086,12 @@ String XtFindFile( continue; } if (*colon == ':') -#ifdef __UNIXOS2__ - if (colon > (path+1)) -#endif break; } len = colon - path; if (Resolve(path, len, substitutions, num_substitutions, buf, '/')) { if (firstTime || strcmp(buf1,buf2) != 0) { -#ifdef __UNIXOS2__ - { - char *bufx = (char*)__XOS2RedirRoot(buf); - strcpy(buf,bufx); - } -#endif #ifdef XNL_DEBUG printf("Testing file %s\n", buf); #endif /* XNL_DEBUG */ @@ -1149,7 +1134,7 @@ static char *ExtractLocaleName( String lang) { -#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined (linux) +#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined (linux) # ifdef hpux /* * We need to discriminated between HPUX 9 and HPUX 10. The equivalent @@ -1171,7 +1156,7 @@ static char *ExtractLocaleName( # define STARTCHAR '\001' # define ENDCHAR '\001' # else -# if defined(WIN32) || defined(__UNIXOS2__) +# ifdef WIN32 # define SKIPCOUNT 1 # define STARTCHAR '=' # define ENDCHAR ';' @@ -1327,18 +1312,6 @@ static const char *implementation_default_path(void) static char xfilesearchpath[] = ""; return xfilesearchpath; -#elif defined(__UNIXOS2__) - /* if you know how to pass % thru the compiler let me know */ - static char xfilesearchpath[] = XFILESEARCHPATHDEFAULT; - static Bool fixed; - char *ch; - - if (!fixed) { - for (ch = xfilesearchpath; ch = strchr(ch, ';'); ch++) - *ch = '%'; - fixed = True; - } - return xfilesearchpath; #else return XFILESEARCHPATHDEFAULT; #endif diff --git a/src/NextEvent.c b/src/NextEvent.c index b1f7bc7..4f2dcfb 100644 --- a/src/NextEvent.c +++ b/src/NextEvent.c @@ -75,9 +75,6 @@ in this Software without prior written authorization from The Open Group. #include <stdio.h> #include <errno.h> -#ifdef __UNIXOS2__ -#include <sys/time.h> -#endif static TimerEventRec* freeTimerRecs; static WorkProcRec* freeWorkRecs; diff --git a/src/TMparse.c b/src/TMparse.c index 5594cad..83b39d5 100644 --- a/src/TMparse.c +++ b/src/TMparse.c @@ -380,11 +380,7 @@ static EventKey events[] = { }; -#ifndef __UNIXOS2__ #define IsNewline(str) ((str) == '\n') -#else -#define IsNewline(str) ((str) == '\n' || (str) == '\r') -#endif #define ScanFor(str, ch) \ while ((*(str) != (ch)) && (*(str) != '\0') && !IsNewline(*(str))) (str)++ @@ -396,13 +392,8 @@ static EventKey events[] = { ('a' <= *(str) && *(str) <= 'z') || \ ('0' <= *(str) && *(str) <= '9')) (str)++ -#ifndef __UNIXOS2__ #define ScanWhitespace(str) \ while (*(str) == ' ' || *(str) == '\t') (str)++ -#else -#define ScanWhitespace(str) \ - while (*(str) == ' ' || *(str) == '\t' || *(str) == '\r') (str)++ -#endif static Boolean initialized = FALSE; static XrmQuark QMeta; @@ -1811,11 +1802,7 @@ static void ShowProduction( size_t len; char *eol, *production, productionbuf[500]; -#ifdef __UNIXOS2__ - eol = strchr(currentProduction, '\r'); - if (!eol) /* try '\n' as well below */ -#endif - eol = strchr(currentProduction, '\n'); + eol = strchr(currentProduction, '\n'); if (eol) len = eol - currentProduction; else len = strlen (currentProduction); production = XtStackAlloc (len + 1, productionbuf); diff --git a/src/Vendor.c b/src/Vendor.c index 26767b7..da40e07 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -64,27 +64,10 @@ SOFTWARE. * ***************************************************************************/ -#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__CYGWIN__) || defined(__MINGW32__) /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; -#if defined(__UNIXOS2__) -unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) -{ - switch (flag) { - case 0: /*called on init*/ - _CRT_init(); - vendorShellWidgetClass = (WidgetClass)(&vendorShellClassRec); - return 1; - case 1: /*called on exit*/ - return 1; - default: - return 0; - } -} -#endif - -#if defined(__CYGWIN__) || defined(__MINGW32__) int __stdcall DllMain(unsigned long mod_handle, unsigned long flag, void *routine) { @@ -99,7 +82,6 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine) return 1; } #endif -#endif externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { { diff --git a/src/sharedlib.c b/src/sharedlib.c index 7aefc23..52138e8 100644 --- a/src/sharedlib.c +++ b/src/sharedlib.c @@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group. #include "CreateI.h" -#if defined(AIXSHLIB) || defined(__UNIXOS2__) +#if defined(AIXSHLIB) WidgetClass vendorShellWidgetClass = (WidgetClass) &vendorShellClassRec; static void _XtVendorInitialize() commit 0033d063894d003b1cb6edb14107d6ef7e0f3fec Author: Egbert Eich <e...@freedesktop.org> Date: Thu Sep 8 16:40:27 2011 +0200 Add XtErrorDB directory to pkg-config file. Should anyone ever desire to supply this file externally it's location is specified in the pkg-config file. Signed-off-by: Egbert Eich <e...@freedesktop.org> Reviewed-by: Gaetan Nadon <mems...@videotron.ca> Tested-by: Gaetan Nadon <mems...@videotron.ca> diff --git a/xt.pc.in b/xt.pc.in index 28ce24a..1daf61f 100644 --- a/xt.pc.in +++ b/xt.pc.in @@ -3,6 +3,8 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ appdefaultdir=@appdefaultdir@ +datarootdir=@datarootdir@ +errordbdir=@ERRORDBDIR@ Name: Xt Description: X Toolkit Library commit 15d7f9cf9e089f5968a20f80529096e9a1d3551f Author: Egbert Eich <e...@freedesktop.org> Date: Thu May 19 18:18:52 2011 +0200 Install ErrorDB into a $datarootdir-path, not $libdir. This lets Xt search for it's ErrorDB in the same location as Xlib. These error databases are architecture independent data files. The XtErrorDB file neither exists in libXt nor has it ever been supplied by any '3rd party' (at least Google didn't turn up any results). Therefore changing the location of this file (again) should have no side effects on backward compatibility. Signed-off-by: Egbert Eich <e...@freedesktop.org> Reviewed-by: Gaetan Nadon <mems...@videotron.ca> Tested-by: Gaetan Nadon <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index d15b326..c59cc26 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,9 @@ case $host_os in esac AC_SUBST(STRINGSABIOPTIONS) +ERRORDBDIR=${datadir}/X11 +AC_SUBST(ERRORDBDIR) + case $host_os in darwin*) OS_CFLAGS="-Wl,-flat_namespace" diff --git a/src/Makefile.am b/src/Makefile.am index cf54a5c..de60cfc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ BUILT_SOURCES = $(BUILT_FILES) CLEANFILES = $(BUILT_SOURCES) SRCH_DEFINES = -DXFILESEARCHPATHDEFAULT=\"$(XFILESEARCHPATHDEFAULT)\" -ERRORDB_DEFINES = -DERRORDB=\"$(libdir)/X11/XtErrorDB\" +ERRORDB_DEFINES = -DERRORDB=\"$(ERRORDBDIR)/XtErrorDB\" AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \ $(XTMALLOC_ZERO_CFLAGS) commit 690d6587e7e0ba29b70d2b1d6c5c6a128c5547a2 Author: Eric S. Raymond <e...@thyrsus.com> Date: Thu Aug 23 11:43:42 2012 -0400 Remove unused macros that are temptations to presentation-level klugery. Also, change .Ds/.De to use CW font, as what they're wrapping is code displays. This may not be recognized on archaic Unixes, but .ft 1 isn't any too safe either. The PostScript and DVI drivers both grok CW. Signed-off-by: Eric S. Raymond <e...@thyrsus.com> diff --git a/man/XtAddActions.man b/man/XtAddActions.man index 8fd60d7..6b728a3 100644 --- a/man/XtAddActions.man +++ b/man/XtAddActions.man @@ -37,7 +37,7 @@ .de Ds .nf .\\$1D \\$2 \\$1 -.ft 1 +.ft CW .ps \\n(PS .\".if \\n(VS>=40 .vs \\n(VSu .\".if \\n(VS<=39 .vs \\n(VSp @@ -51,43 +51,8 @@ .sp \\n(DDu .fi .. -.de FD -.LP -.KS -.TA .5i 3i -.ta .5i 3i -.nf -.. -.de FN -.fi -.KE -.LP -.. .de IN \" send an index entry to the stderr .. -.de C{ -.KS -.nf -.D -.\" -.\" choose appropriate monospace font -.\" the imagen conditional, 480, -.\" may be changed to L if LB is too -.\" heavy for your eyes... -.\" -.ie "\\*(.T"480" .ft L -.el .ie "\\*(.T"300" .ft L -.el .ie "\\*(.T"202" .ft PO -.el .ie "\\*(.T"aps" .ft CW -.el .ft R -.ps \\n(PS -.ie \\n(VS>40 .vs \\n(VSu -.el .vs \\n(VSp -.. -.de C} -.DE -.R -.. .de Pn .ie t \\$1\fB\^\\$2\^\fR\\$3 .el \\$1\fI\^\\$2\^\fP\\$3 @@ -96,32 +61,6 @@ .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. -.de NT -.ne 7 -.ds NO Note -.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2 -.if \\n(.$ .if !'\\$1'C' .ds NO \\$1 -.ie n .sp -.el .sp 10p -.TB -.ce -\\*(NO -.ie n .sp -.el .sp 5p -.if '\\$1'C' .ce 99 -.if '\\$2'C' .ce 99 -.in +5n -.ll -5n -.R -.. -. \" Note End -- doug kraft 3/85 -.de NE -.ce 0 -.in -5n -.ll +5n -.ie n .sp -.el .sp 10p -.. .ny0 .TH XtAddActions __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME diff --git a/man/XtAddCallback.man b/man/XtAddCallback.man index 817e639..440074d 100644 --- a/man/XtAddCallback.man +++ b/man/XtAddCallback.man @@ -37,7 +37,7 @@ .de Ds .nf .\\$1D \\$2 \\$1 -.ft 1 +.ft CW .ps \\n(PS .\".if \\n(VS>=40 .vs \\n(VSu .\".if \\n(VS<=39 .vs \\n(VSp @@ -51,43 +51,8 @@ .sp \\n(DDu .fi .. -.de FD -.LP -.KS -.TA .5i 3i -.ta .5i 3i -.nf -.. -.de FN -.fi -.KE -.LP -.. .de IN \" send an index entry to the stderr .. -.de C{ -.KS -.nf -.D -.\" -.\" choose appropriate monospace font -.\" the imagen conditional, 480, -.\" may be changed to L if LB is too -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1v8w2p-00044s...@vasks.debian.org