Hello community,
here is the log from the commit of package xfs for openSUSE:Factory checked in at 2017-11-30 12:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xfs (Old)
and /work/SRC/openSUSE:Factory/.xfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xfs"
Thu Nov 30 12:45:14 2017 rev:13 rq:546298 version:1.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/xfs/xfs.changes 2017-05-31 12:20:26.174521888 +0200
+++ /work/SRC/openSUSE:Factory/.xfs.new/xfs.changes 2017-11-30 12:45:16.206183321 +0100
@@ -1,0 +2,9 @@
+Tue Nov 28 19:30:37 UTC 2017 - sndirsch@suse.com
+
+- xfs 1.2.0
+ * This release ports the X Font Server to libXfont 2.x.
+ Distributions may now drop libXfont 1.x at their convenience.
+ This conversion has been lightly tested but some issues may
+ remain; please report any new issues to xorg-devel@lists.x.org.
+
+-------------------------------------------------------------------
Old:
----
xfs-1.1.4.tar.bz2
New:
----
xfs-1.2.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xfs.spec ++++++
--- /var/tmp/diff_new_pack.OwuqJi/_old 2017-11-30 12:45:16.990154821 +0100
+++ /var/tmp/diff_new_pack.OwuqJi/_new 2017-11-30 12:45:16.994154676 +0100
@@ -17,7 +17,7 @@
Name: xfs
-Version: 1.1.4
+Version: 1.2.0
Release: 0
# FIXME: update xorg-x11-fonts-devel BuildRequires to font-util after renaming is done
Summary: X font server
@@ -35,7 +35,7 @@
BuildRequires: pkg-config
# FIXME: change to font-util >= 1.1 when xorg-x11-fonts-devel will be renamed
BuildRequires: xorg-x11-fonts-devel
-BuildRequires: pkgconfig(xfont)
+BuildRequires: pkgconfig(xfont2)
BuildRequires: pkgconfig(xorg-macros) >= 1.10
BuildRequires: pkgconfig(xproto) >= 7.0.17
BuildRequires: pkgconfig(xtrans)
++++++ xfs-1.1.4.tar.bz2 -> xfs-1.2.0.tar.bz2 ++++++
++++ 11300 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/ChangeLog new/xfs-1.2.0/ChangeLog
--- old/xfs-1.1.4/ChangeLog 2014-08-22 07:36:15.000000000 +0200
+++ new/xfs-1.2.0/ChangeLog 2017-11-28 18:19:20.000000000 +0100
@@ -1,3 +1,153 @@
+commit c0ff087474db78b91241c31c00a501782a3da31b
+Author: Adam Jackson
+Date: Tue Nov 28 12:16:13 2017 -0500
+
+ xfs 1.2.0
+
+ Signed-off-by: Adam Jackson
+
+commit fedc90e8e3f6c36204de5562bfb726270064a4f1
+Author: Adam Jackson
+Date: Mon Apr 24 17:35:14 2017 -0400
+
+ xfs: port to libXfont2
+
+ This appears to work, in the sense that xfsinfo and fslsfonts print the
+ same thing before and after.
+
+ Signed-off-by: Adam Jackson
+
+commit 47eceb44ca00569b76e4304ee3b36c8f87d46a3e
+Author: Adam Jackson
+Date: Mon Apr 24 15:33:39 2017 -0400
+
+ xtrans: Simplify an error path when started from inetd
+
+ The old code is redundant, since our caller looks like:
+
+ OldListen = _FontTransGetInetdListenInfo (inetdListener);
+ if (OldListen == NULL) {
+ FatalError("failed to initialize OldListen to inetd socket: %s\n",
+ strerror(errno));
+ }
+
+ Signed-off-by: Adam Jackson
+
+commit fcdfd5053c21441265645eb381bb9120f972735c
+Author: Mihail Konev
+Date: Thu Jan 26 14:00:21 2017 +1000
+
+ autogen: add default patch prefix
+
+ Signed-off-by: Mihail Konev
+
+commit 22c4117e8c7e08f15e42be3120eff58cb04fdd0d
+Author: Emil Velikov
+Date: Mon Mar 9 12:00:52 2015 +0000
+
+ autogen.sh: use quoted string variables
+
+ Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+ fall-outs, when they contain space.
+
+ Signed-off-by: Emil Velikov
+ Reviewed-by: Peter Hutterer
+ Signed-off-by: Peter Hutterer
+
+commit 89c3df532ae4bd9d5924a445264a9df3a97f6bf6
+Author: Peter Hutterer
+Date: Tue Jan 24 10:32:07 2017 +1000
+
+ autogen.sh: use exec instead of waiting for configure to finish
+
+ Syncs the invocation of configure with the one from the server.
+
+ Signed-off-by: Peter Hutterer
+ Reviewed-by: Emil Velikov
+
+commit 9e64669db3b19ce11b40e084cf2d366bfd52826f
+Author: Thomas Klausner
+Date: Thu Jul 23 13:55:18 2015 +0200
+
+ Include config.h first, and add comment about Xpoll.h.
+
+ (To avoid having this header moved lower.)
+
+ Signed-off-by: Thomas Klausner
+ Reviewed-by: Emil Velikov
+
+commit 75be718a55376d39b0e517da33ef7a7557ac8f20
+Author: Thomas Klausner
+Date: Sun Jul 19 09:55:55 2015 +0200
+
+ Ignore .dirstamp files.
+
+ Signed-off-by: Thomas Klausner
+ Reviewed-by: Alan Coopersmith
+
+commit 1508df2fa02daff7a5cd58ce5d64e42b44ff4065
+Author: Matthew Green
+Date: Sun Jul 19 09:54:59 2015 +0200
+
+ FD_SETSIZE fixes.
+
+ Move X11/Xpoll.h include earlier than sys/select.h to avoid missing
+ out on setting FD_SETSIZE early enough.
+
+ Signed-off-by: Thomas Klausner
+ Reviewed-by: Alan Coopersmith
+
+commit 4fdc960c33724f859be74a630e0d668a74f6637d
+Author: Alan Coopersmith
+Date: Mon Jun 8 23:20:06 2015 -0700
+
+ Fix memory leaks when not using alloca
+
+ Reported by Oracle Parfait 1.5.1:
+
+ Error: Memory leak (CWE 401)
+ Memory leak of pointer client_auth allocated with FSalloc((prefix->num_auths * 24))
+ at line 256 of difs/dispatch.c in function 'ProcEstablishConnection'.
+ client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
+ client_auth leaks when (((Atom)ad) - ((Atom)(prefix + 8))) > ((stuff->length << 2) - 4) at line 252.
+ malloc called at line 372 of os/utils.c in function 'FSalloc'
+ at line 276 of difs/dispatch.c in function 'ProcEstablishConnection'.
+ client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
+ client_auth leaks when (i + 1) >= ((fsConnClientPrefix*)client->requestBuffer)[1].num_auths at line 251.
+ malloc called at line 372 of os/utils.c in function 'FSalloc'
+
+ Error: Memory leak (CWE 401)
+ Memory leak of pointer acp allocated with FSalloc((stuff->num_auths * 24))
+ at line 604 of difs/dispatch.c in function 'ProcCreateAC'.
+ acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
+ acp leaks when ((((Atom)ad) - ((Atom)client->requestBuffer)) + 8) > ((stuff->length << 2) - 4) at line 599.
+ malloc called at line 372 of os/utils.c in function 'FSalloc'
+ at line 622 of difs/dispatch.c in function 'ProcCreateAC'.
+ acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
+ acp leaks when (i + 1) >= ((fsCreateACReq*)client->requestBuffer)->num_auths at line 597.
+ malloc called at line 372 of os/utils.c in function 'FSalloc'
+
+ Signed-off-by: Alan Coopersmith
+
+commit 3d9bc5a3a8dd36188b0c09d536dcc3c0a8339c31
+Author: Alan Coopersmith
+Date: Sat Aug 23 13:00:24 2014 -0700
+
+ Add const to port variable passed to TRANS(ReopenCOTSServer)
+
+ Before this patch, gcc always warns:
+ os/xfstrans.c: In function ‘_FontTransGetInetdListenInfo’:
+ os/xfstrans.c:38:18: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
+ char *port = "0";
+ ^
+
+ After this patch, with prior versons of libxtrans, gcc will warn about
+ passing a const to TRANS(ReopenCOTSServer) where non-const is expected.
+
+ With both this patch & the libxtrans const patches, there are no warnings.
+
+ Signed-off-by: Alan Coopersmith
+
commit 4bc3e1f01864f09ce87b8eba9b1970ea3715375c
Author: Alan Coopersmith
Date: Thu Aug 21 22:34:59 2014 -0700
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/compile new/xfs-1.2.0/compile
--- old/xfs-1.1.4/compile 2014-08-22 07:35:15.000000000 +0200
+++ new/xfs-1.2.0/compile 2017-11-28 18:19:17.000000000 +0100
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
@@ -255,7 +255,8 @@
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -342,6 +343,6 @@
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/configure.ac new/xfs-1.2.0/configure.ac
--- old/xfs-1.1.4/configure.ac 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/configure.ac 2017-11-28 18:19:13.000000000 +0100
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xfs],
- [1.1.4],
+ [1.2.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xfs])
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
@@ -129,8 +129,8 @@
# Checks for pkg-config packages
# - xproto >= 7.0.17 required for _X_NORETURN in
-# - xfont >= 1.4.5 required for matching MakeAtom prototypes in fontmisc.h
-PKG_CHECK_MODULES(XFS, xproto >= 7.0.17 xfont >= 1.4.5 xtrans)
+# - xfont >= 2.0.1 for new server API
+PKG_CHECK_MODULES(XFS, xproto >= 7.0.17 xfont2 >= 2.0.1 xtrans)
case "$host_os" in
cygwin*|mingw*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/atom.c new/xfs-1.2.0/difs/atom.c
--- old/xfs-1.1.4/difs/atom.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/atom.c 2017-11-28 18:19:13.000000000 +0100
@@ -148,7 +148,7 @@
return (atom != None) && (atom <= lastAtom);
}
-char *
+const char *
NameForAtom(Atom atom)
{
NodePtr node;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/charinfo.c new/xfs-1.2.0/difs/charinfo.c
--- old/xfs-1.1.4/difs/charinfo.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/charinfo.c 2017-11-28 18:19:13.000000000 +0100
@@ -54,11 +54,6 @@
#include
#include "misc.h"
#include
-#include
-
-/* Don't conflict with macros/prototypes in difsutils.h */
-#define _HAVE_XALLOC_DECLS
-#include
#include "clientstr.h"
#define FSMD_H
@@ -249,6 +244,71 @@
return Successful;
}
+static int
+CheckFSFormat(fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ int *bit_order,
+ int *byte_order,
+ int *scan,
+ int *glyph,
+ int *image)
+{
+ /* convert format to what the low levels want */
+ if (fmask & BitmapFormatMaskBit) {
+ *bit_order = format & BitmapFormatBitOrderMask;
+ *bit_order = (*bit_order == BitmapFormatBitOrderMSB)
+ ? MSBFirst : LSBFirst;
+ }
+ if (fmask & BitmapFormatMaskByte) {
+ *byte_order = format & BitmapFormatByteOrderMask;
+ *byte_order = (*byte_order == BitmapFormatByteOrderMSB)
+ ? MSBFirst : LSBFirst;
+ }
+ if (fmask & BitmapFormatMaskScanLineUnit) {
+ *scan = format & BitmapFormatScanlineUnitMask;
+ /* convert byte paddings into byte counts */
+ switch (*scan) {
+ case BitmapFormatScanlineUnit8:
+ *scan = 1;
+ break;
+ case BitmapFormatScanlineUnit16:
+ *scan = 2;
+ break;
+ case BitmapFormatScanlineUnit32:
+ *scan = 4;
+ break;
+ default:
+ return BadFontFormat;
+ }
+ }
+ if (fmask & BitmapFormatMaskScanLinePad) {
+ *glyph = format & BitmapFormatScanlinePadMask;
+ /* convert byte paddings into byte counts */
+ switch (*glyph) {
+ case BitmapFormatScanlinePad8:
+ *glyph = 1;
+ break;
+ case BitmapFormatScanlinePad16:
+ *glyph = 2;
+ break;
+ case BitmapFormatScanlinePad32:
+ *glyph = 4;
+ break;
+ default:
+ return BadFontFormat;
+ }
+ }
+ if (fmask & BitmapFormatMaskImageRectangle) {
+ *image = format & BitmapFormatImageRectMask;
+
+ if (*image != BitmapFormatImageRectMin &&
+ *image != BitmapFormatImageRectMaxWidth &&
+ *image != BitmapFormatImageRectMax)
+ return BadFontFormat;
+ }
+ return Successful;
+}
+
static int
packGlyphs (
ClientPtr client,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/difsutils.c new/xfs-1.2.0/difs/difsutils.c
--- old/xfs-1.1.4/difs/difsutils.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/difsutils.c 2017-11-28 18:19:13.000000000 +0100
@@ -227,7 +227,7 @@
/* block & wakeup handlers */
typedef struct _BlockHandler {
- BlockHandlerProcPtr BlockHandler;
+ FontBlockHandlerProcPtr BlockHandler;
DifsWakeupFunc WakeupHandler;
pointer blockData;
Bool deleted;
@@ -252,8 +252,7 @@
++inHandler;
for (i = 0; i < numHandlers; i++)
- (*handlers[i].BlockHandler) (handlers[i].blockData,
- pTimeout, pReadmask);
+ (*handlers[i].BlockHandler) (handlers[i].blockData);
if (handlerDeleted) {
for (i = 0; i < numHandlers;)
if (handlers[i].deleted) {
@@ -297,7 +296,7 @@
Bool
RegisterBlockAndWakeupHandlers(
- BlockHandlerProcPtr blockHandler,
+ FontBlockHandlerProcPtr blockHandler,
DifsWakeupFunc wakeupHandler,
pointer blockData)
{
@@ -320,7 +319,7 @@
void
RemoveBlockAndWakeupHandlers(
- BlockHandlerProcPtr blockHandler,
+ FontBlockHandlerProcPtr blockHandler,
DifsWakeupFunc wakeupHandler,
pointer blockData)
{
@@ -527,8 +526,9 @@
}
int
-set_font_authorizations(char **authorizations, int *authlen, ClientPtr client)
+set_font_authorizations(char **authorizations, int *authlen, void *_client)
{
+ ClientPtr client = _client;
#define AUTH1_NAME "hp-hostname-1"
#define AUTH2_NAME "hp-printername-1"
static char result[1024];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/dispatch.c new/xfs-1.2.0/difs/dispatch.c
--- old/xfs-1.1.4/difs/dispatch.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/dispatch.c 2017-11-28 18:19:13.000000000 +0100
@@ -253,6 +253,7 @@
int lengthword = stuff->length;
SendErrToClient(client, FSBadLength, (pointer)&lengthword);
+ DEALLOCATE_LOCAL(client_auth);
return (FSBadLength);
}
/* copy carefully in case wire data is not aligned */
@@ -273,6 +274,7 @@
int lengthword = stuff->length;
SendErrToClient(client, FSBadLength, (pointer)&lengthword);
+ DEALLOCATE_LOCAL(client_auth);
return (FSBadLength);
}
@@ -292,6 +294,7 @@
authp = (AuthContextPtr) fsalloc(sizeof(AuthContextRec));
if (!authp) {
SendErrToClient(client, FSBadAlloc, (pointer) 0);
+ DEALLOCATE_LOCAL(client_auth);
return FSBadAlloc;
}
authp->authname =
@@ -303,6 +306,7 @@
fsfree((char *) authp->authdata);
fsfree((char *) authp);
SendErrToClient(client, FSBadAlloc, (pointer) 0);
+ DEALLOCATE_LOCAL(client_auth);
return FSBadAlloc;
}
memmove( authp->authname, client_auth[auth_index - 1].name,
@@ -318,6 +322,7 @@
fsfree((char *) authp->authdata);
fsfree((char *) authp);
SendErrToClient(client, FSBadAlloc, (pointer) 0);
+ DEALLOCATE_LOCAL(client_auth);
return FSBadAlloc;
}
client->auth = client->default_auth = authp;
@@ -601,6 +606,7 @@
int lengthword = stuff->length;
SendErrToClient(client, FSBadLength, (pointer)&lengthword);
+ DEALLOCATE_LOCAL(acp);
return (FSBadLength);
}
/* copy carefully in case data is not aligned */
@@ -619,6 +625,8 @@
int lengthword = stuff->length;
SendErrToClient(client, FSBadLength, (pointer)&lengthword);
+ if (acp)
+ DEALLOCATE_LOCAL(acp);
return (FSBadLength);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/fontinfo.c new/xfs-1.2.0/difs/fontinfo.c
--- old/xfs-1.1.4/difs/fontinfo.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/fontinfo.c 2017-11-28 18:19:13.000000000 +0100
@@ -58,6 +58,7 @@
#include "closestr.h"
#include "globals.h"
#include "difs.h"
+#include "misc.h"
#include "dispatch.h"
#include
#include
@@ -82,7 +83,7 @@
{
int i;
int data_len, cur_off;
- char *str;
+ const char *str;
pointer ptr, off_ptr, string_base;
fsPropOffset local_offset;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/fonts.c new/xfs-1.2.0/difs/fonts.c
--- old/xfs-1.1.4/difs/fonts.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/fonts.c 2017-11-28 18:19:13.000000000 +0100
@@ -63,10 +63,11 @@
#include "difs.h"
#include "dispatch.h"
#include "swaprep.h"
+#include
static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0;
static int num_fpes = 0;
-static FPEFunctions *fpe_functions = (FPEFunctions *) 0;
+static xfont2_fpe_funcs_rec *fpe_functions;
static int num_fpe_types = 0;
static int num_slept_fpes = 0;
@@ -179,7 +180,7 @@
/* wake up any fpe's that may be waiting for information */
for (i = 0; i < num_slept_fpes; i++) {
fpe = slept_fpes[i];
- (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe, lastSelectMask);
+ (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe);
}
}
@@ -342,7 +343,8 @@
cfp->clientindex = cPtr->client->index;
if (fontPatternCache && pfont != cPtr->non_cachable_font)
- CacheFontPattern(fontPatternCache, cPtr->orig_name, cPtr->orig_len, pfont);
+ xfont2_cache_font_pattern(fontPatternCache, cPtr->orig_name,
+ cPtr->orig_len, pfont);
/* either pull out the other id or make the array */
if (pfont->refcnt != 0) {
@@ -459,7 +461,8 @@
*/
if (fontPatternCache &&
- (pfont = FindCachedFontPattern(fontPatternCache, name, namelen)) &&
+ (pfont = xfont2_find_cached_font_pattern(fontPatternCache, name,
+ namelen)) &&
pfont->info.cachable) {
ClientFontPtr cfp;
@@ -550,7 +553,7 @@
assert(pfont);
if (--pfont->refcnt == 0) {
if (fontPatternCache)
- RemoveCachedFontPattern(fontPatternCache, pfont);
+ xfont2_remove_cached_font_pattern(fontPatternCache, pfont);
fpe = pfont->fpe;
free_svrPrivate(pfont->svrPrivate);
(*fpe_functions[fpe->type].close_font) (fpe, pfont);
@@ -726,7 +729,7 @@
font_path_elements = fplist;
num_fpes = npaths;
if (fontPatternCache)
- EmptyFontPatternCache(fontPatternCache);
+ xfont2_empty_font_pattern_cache(fontPatternCache);
return FSSuccess;
bail:
*bad = validpaths;
@@ -877,11 +880,11 @@
if (cPtr->haveSaved)
{
if (cPtr->savedName)
- (void)AddFontNamesName(cPtr->names, cPtr->savedName,
- cPtr->savedNameLen);
+ xfont2_add_font_names_name(cPtr->names, cPtr->savedName,
+ cPtr->savedNameLen);
}
else
- (void)AddFontNamesName(cPtr->names, name, namelen);
+ xfont2_add_font_names_name(cPtr->names, name, namelen);
}
/*
@@ -1032,7 +1035,7 @@
FreeFPE(cPtr->fpe_list[i]);
fsfree(cPtr->fpe_list);
if (cPtr->savedName) fsfree(cPtr->savedName);
- FreeFontNames(names);
+ xfont2_free_font_names(names);
fsfree(cPtr);
return TRUE;
}
@@ -1066,7 +1069,7 @@
fsfree(c);
goto badAlloc;
}
- c->names = MakeFontNamesRecord(maxNames < 100 ? maxNames : 100);
+ c->names = xfont2_make_font_names_record(maxNames < 100 ? maxNames : 100);
if (!c->names)
{
fsfree(c->fpe_list);
@@ -1403,52 +1406,17 @@
int
-RegisterFPEFunctions(
- NameCheckFunc name_func,
- InitFpeFunc init_func,
- FreeFpeFunc free_func,
- ResetFpeFunc reset_func,
- OpenFontFunc open_func,
- CloseFontFunc close_func,
- ListFontsFunc list_func,
- StartLfwiFunc start_lfwi_func,
- NextLfwiFunc next_lfwi_func,
- WakeupFpeFunc wakeup_func,
- ClientDiedFunc client_died,
- LoadGlyphsFunc load_glyphs,
- StartLaFunc start_list_alias_func,
- NextLaFunc next_list_alias_func,
- SetPathFunc set_path_func)
+register_fpe_funcs(const xfont2_fpe_funcs_rec *funcs)
{
- FPEFunctions *new;
+ xfont2_fpe_funcs_rec *new;
/* grow the list */
- new = (FPEFunctions *) fsrealloc(fpe_functions,
- (num_fpe_types + 1) * sizeof(FPEFunctions));
+ new = fsrealloc(fpe_functions, (num_fpe_types + 1) * sizeof(*new));
if (!new)
return -1;
fpe_functions = new;
- fpe_functions[num_fpe_types].name_check = name_func;
- fpe_functions[num_fpe_types].open_font = open_func;
- fpe_functions[num_fpe_types].close_font = close_func;
- fpe_functions[num_fpe_types].wakeup_fpe = wakeup_func;
- fpe_functions[num_fpe_types].list_fonts = list_func;
- fpe_functions[num_fpe_types].start_list_fonts_with_info =
- start_lfwi_func;
- fpe_functions[num_fpe_types].list_next_font_with_info =
- next_lfwi_func;
- fpe_functions[num_fpe_types].init_fpe = init_func;
- fpe_functions[num_fpe_types].free_fpe = free_func;
- fpe_functions[num_fpe_types].reset_fpe = reset_func;
-
- fpe_functions[num_fpe_types].client_died = client_died;
- fpe_functions[num_fpe_types].load_glyphs = load_glyphs;
- fpe_functions[num_fpe_types].start_list_fonts_and_aliases =
- start_list_alias_func;
- fpe_functions[num_fpe_types].list_next_font_or_alias =
- next_list_alias_func;
- fpe_functions[num_fpe_types].set_path_hook = set_path_func;
+ memcpy(&fpe_functions[num_fpe_types], funcs, sizeof(*funcs));
return num_fpe_types++;
}
@@ -1486,9 +1454,9 @@
static unsigned int last_server_gen;
int
-init_fs_handlers(
+xfs_init_fs_handlers(
FontPathElementPtr fpe,
- BlockHandlerProcPtr block_handler)
+ FontBlockHandlerProcPtr block_handler)
{
/* if server has reset, make sure the b&w handlers are reinstalled */
if (last_server_gen < serverGeneration) {
@@ -1511,9 +1479,9 @@
}
void
-remove_fs_handlers(
+xfs_remove_fs_handlers(
FontPathElementPtr fpe,
- BlockHandlerProcPtr block_handler,
+ FontBlockHandlerProcPtr block_handler,
Bool all)
{
if (all) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/difs/initfonts.c new/xfs-1.2.0/difs/initfonts.c
--- old/xfs-1.1.4/difs/initfonts.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/difs/initfonts.c 2017-11-28 18:19:13.000000000 +0100
@@ -49,20 +49,55 @@
#include "config.h"
+#include
#include
+#include
+#include
#include "difs.h"
#include "globals.h"
-FontPatternCachePtr fontPatternCache;
+xfont2_pattern_cache_ptr fontPatternCache;
+
+static unsigned long
+GetServerGeneration(void)
+{
+ return serverGeneration;
+}
+
+static const xfont2_client_funcs_rec xfs_client_funcs = {
+ .version = XFONT2_CLIENT_FUNCS_VERSION,
+ .client_auth_generation = client_auth_generation,
+ .client_signal = ClientSignal,
+ .delete_font_client_id = DeleteFontClientID,
+ .verrorf = NULL,
+ .find_old_font = find_old_font,
+ .get_client_resolutions = GetClientResolutions,
+ .get_default_point_size = GetDefaultPointSize,
+ .get_new_font_client_id = GetNewFontClientID,
+ .get_time_in_millis = GetTimeInMillis,
+ .init_fs_handlers = xfs_init_fs_handlers,
+ .register_fpe_funcs = register_fpe_funcs,
+ .remove_fs_handlers = xfs_remove_fs_handlers,
+ .get_server_client = NULL,
+ .set_font_authorizations = set_font_authorizations,
+ .store_font_client_font = StoreFontClientFont,
+ .make_atom = MakeAtom,
+ .valid_atom = ValidAtom,
+ .name_for_atom = NameForAtom,
+ .get_server_generation = GetServerGeneration,
+ .add_fs_fd = NULL,
+ .remove_fs_fd = NULL,
+ .adjust_fs_wait_for_delay = NULL,
+};
void
InitFonts(void)
{
if (fontPatternCache)
- FreeFontPatternCache(fontPatternCache);
- fontPatternCache = MakeFontPatternCache();
+ xfont2_free_font_pattern_cache(fontPatternCache);
+ fontPatternCache = xfont2_make_font_pattern_cache();
- ResetFontPrivateIndex();
+ // ResetFontPrivateIndex();
- register_fpe_functions();
+ xfont2_init(&xfs_client_funcs);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/include/difs.h new/xfs-1.2.0/include/difs.h
--- old/xfs-1.1.4/include/difs.h 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/include/difs.h 2017-11-28 18:19:13.000000000 +0100
@@ -29,7 +29,6 @@
#include "difsfn.h"
#include "globals.h"
#include
-#include
typedef int (*InitialFunc)(ClientPtr);
typedef int (*ProcFunc)(ClientPtr);
@@ -65,6 +64,13 @@
extern int LoadGlyphRanges ( ClientPtr client, FontPtr pfont, Bool range_flag, int num_ranges, int item_size, fsChar2b *data );
extern FontPtr find_old_font ( FSID id );
extern void DeleteClientFontStuff ( ClientPtr client );
+extern int xfs_init_fs_handlers(FontPathElementPtr fpe,
+ FontBlockHandlerProcPtr block_handler);
+
+extern void xfs_remove_fs_handlers(FontPathElementPtr fpe,
+ FontBlockHandlerProcPtr block_handler,
+ Bool all);
+extern int register_fpe_funcs(const xfont2_fpe_funcs_rec *funcs);
/* difs/fontinfo.c */
extern int convert_props ( FontInfoPtr pinfo, fsPropInfo **props );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/include/difsutils.h new/xfs-1.2.0/include/difsutils.h
--- old/xfs-1.1.4/include/difsutils.h 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/include/difsutils.h 2017-11-28 18:19:13.000000000 +0100
@@ -30,7 +30,7 @@
#include
#include
#include
-#include
+#include
typedef void (*DifsWakeupFunc)(pointer data, int result, unsigned long * pReadmask);
typedef Bool (*DifsWorkFunc) (ClientPtr, pointer);
@@ -39,7 +39,7 @@
extern Bool ClientIsAsleep (ClientPtr client);
extern Bool ClientSleep (ClientPtr client, Bool (*function) (ClientPtr, pointer), pointer data);
extern Bool QueueWorkProc (DifsWorkFunc function, ClientPtr client, pointer data);
-extern Bool RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
+extern Bool RegisterBlockAndWakeupHandlers (FontBlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
#if 0
extern FontResolutionPtr GetClientResolutions (int *num);
#endif
@@ -50,7 +50,7 @@
#if 0
extern int client_auth_generation (ClientPtr client);
#endif
-extern int set_font_authorizations (char **authorizations, int *authlen, ClientPtr client);
+extern int set_font_authorizations (char **authorizations, int *authlen, void *_client);
extern int strncmpnocase (const char *first, const char *second, int n);
extern pointer Xalloc (unsigned long m);
extern pointer Xrealloc (pointer n, unsigned long m);
@@ -59,7 +59,7 @@
extern void InitBlockAndWakeupHandlers (void);
extern void NoopDDA (void);
extern void ProcessWorkQueue (void);
-extern void RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
+extern void RemoveBlockAndWakeupHandlers (FontBlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
extern void SetDefaultPointSize (int ps);
extern void WakeupHandler (int result, unsigned long * pReadmask);
extern void Xfree (unsigned long *n);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/include/globals.h new/xfs-1.2.0/include/globals.h
--- old/xfs-1.1.4/include/globals.h 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/include/globals.h 2017-11-28 18:19:13.000000000 +0100
@@ -50,7 +50,7 @@
#include /* for fsResolution */
#include /* XtransConnInfo */
-#include /* FontPatternCachePtr */
+#include /* xfont2_pattern_cache_ptr */
#include /* select & fd_set */
#include "client.h" /* WorkQueuePtr */
#include "misc.h" /* OldListenRec */
@@ -84,7 +84,7 @@
extern int ConnectionTranslation[];
-extern FontPatternCachePtr fontPatternCache;
+extern xfont2_pattern_cache_ptr fontPatternCache;
extern long LastReapTime;
extern Bool drone_server;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/include/misc.h new/xfs-1.2.0/include/misc.h
--- old/xfs-1.1.4/include/misc.h 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/include/misc.h 2017-11-28 18:19:13.000000000 +0100
@@ -111,11 +111,9 @@
((char *) &(dst))[1] = ((char *) &(src))[0];
-#if 0
-extern void NoopDDA(void);
-extern char *NameForAtom(Atom atom);
-#endif
-
+extern int ValidAtom(Atom atom);
+extern const char *NameForAtom(Atom atom);
+extern Atom MakeAtom(const char *string, unsigned int len, Bool makeit);
#define fsCat(x,y) x##_##y
@@ -175,4 +173,8 @@
/* os/xfstrans.c */
extern OldListenRec *_FontTransGetInetdListenInfo (int fd);
+extern void BitOrderInvert(unsigned char *buf, int nbytes);
+extern void TwoByteSwap(unsigned char *buf, int nbytes);
+extern void FourByteSwap(unsigned char *buf, int nbytes);
+
#endif /* _MISC_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/include/os.h new/xfs-1.2.0/include/os.h
--- old/xfs-1.1.4/include/os.h 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/include/os.h 2017-11-28 18:19:13.000000000 +0100
@@ -130,7 +130,7 @@
extern void GiveUp (int n);
extern void ServerCacheFlush (int n);
extern void ServerReconfig (int n);
-extern long GetTimeInMillis (void);
+extern unsigned int GetTimeInMillis (void);
extern pointer FSalloc(unsigned long);
extern pointer FScalloc (unsigned long amount);
extern pointer FSrealloc(pointer, unsigned long);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/missing new/xfs-1.2.0/missing
--- old/xfs-1.1.4/missing 2014-08-22 07:35:15.000000000 +0200
+++ new/xfs-1.2.0/missing 2017-11-28 18:19:17.000000000 +0100
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -210,6 +210,6 @@
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/os/config.c new/xfs-1.2.0/os/config.c
--- old/xfs-1.1.4/os/config.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/os/config.c 2017-11-28 18:19:13.000000000 +0100
@@ -58,9 +58,8 @@
#include "globals.h"
#include "access.h"
#include "difsutils.h"
-#include
#include "difs.h"
-#include
+#include
/* libXfont/src/bitmap/snfstr.h */
extern void SnfSetFormat(int bit, int byte, int glyph, int scan);
@@ -589,7 +588,7 @@
t = *val;
*val = '\0';
if (!strcmp(parm->parm_name, "deferglyphs")) {
- ParseGlyphCachingMode(start);
+ xfont2_parse_glyph_caching_mode(start);
}
*val = t;
return val;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/os/connection.c new/xfs-1.2.0/os/connection.c
--- old/xfs-1.1.4/os/connection.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/os/connection.c 2017-11-28 18:19:13.000000000 +0100
@@ -69,6 +69,8 @@
#include "config.h"
+/* include Xpoll.h early for possible FD_SETSIZE re-definition */
+#include "X11/Xpoll.h"
#include
#include
#include
@@ -84,7 +86,6 @@
#include
#include
#include "clientstr.h"
-#include "X11/Xpoll.h"
#include "osdep.h"
#include "globals.h"
#include "osstruct.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/os/io.c new/xfs-1.2.0/os/io.c
--- old/xfs-1.1.4/os/io.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/os/io.c 2017-11-28 18:19:13.000000000 +0100
@@ -48,6 +48,9 @@
#include "config.h"
+/* include Xpoll.h early for possible FD_SETSIZE re-definition */
+#include "X11/Xpoll.h"
+
#include
#include
#include
@@ -57,7 +60,6 @@
#include
#include "clientstr.h"
-#include "X11/Xpoll.h"
#include "osdep.h"
#include "globals.h"
#include "dispatch.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/os/utils.c new/xfs-1.2.0/os/utils.c
--- old/xfs-1.1.4/os/utils.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/os/utils.c 2017-11-28 18:19:13.000000000 +0100
@@ -178,7 +178,7 @@
errno = olderrno;
}
-long
+unsigned int
GetTimeInMillis(void)
{
struct timeval tp;
@@ -551,3 +551,86 @@
}
return 0;
}
+
+static const unsigned char _reverse_byte[0x100] = {
+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
+};
+
+/*
+ * Invert bit order within each BYTE of an array.
+ */
+void
+BitOrderInvert(unsigned char *buf, int nbytes)
+{
+ const unsigned char *rev = _reverse_byte;
+
+ for (; --nbytes >= 0; buf++)
+ *buf = rev[*buf];
+}
+
+/*
+ * Invert byte order within each 16-bits of an array.
+ */
+void
+TwoByteSwap(unsigned char *buf, int nbytes)
+{
+ unsigned char c;
+
+ for (; nbytes > 0; nbytes -= 2, buf += 2)
+ {
+ c = buf[0];
+ buf[0] = buf[1];
+ buf[1] = c;
+ }
+}
+
+/*
+ * Invert byte order within each 32-bits of an array.
+ */
+void
+FourByteSwap(unsigned char *buf, int nbytes)
+{
+ unsigned char c;
+
+ for (; nbytes > 0; nbytes -= 4, buf += 4)
+ {
+ c = buf[0];
+ buf[0] = buf[3];
+ buf[3] = c;
+ c = buf[1];
+ buf[1] = buf[2];
+ buf[2] = c;
+ }
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfs-1.1.4/os/xfstrans.c new/xfs-1.2.0/os/xfstrans.c
--- old/xfs-1.1.4/os/xfstrans.c 2014-08-22 07:35:08.000000000 +0200
+++ new/xfs-1.2.0/os/xfstrans.c 2017-11-28 18:19:13.000000000 +0100
@@ -30,12 +30,18 @@
#ifdef XFS_INETD
/* xfs special handling for listen socket passed from inetd */
-#include "misc.h"
+
+/* XXX duplicated from misc.h */
+typedef struct { /* when cloning, need old transport info */
+ int trans_id;
+ int fd;
+ int portnum;
+} OldListenRec;
OldListenRec *
TRANS(GetInetdListenInfo) (int fd)
{
- char *port = "0";
+ const char *port = "0";
XtransConnInfo inetdCI;
OldListenRec *old_listen;
int portnum;
@@ -79,10 +85,7 @@
#endif
if (listen (fd, BACKLOG) < 0)
- {
- FatalError("listen() failed on inetd socket: %s\n",
- strerror(errno));
- }
+ return NULL;
/* Pass the inetd socket back through the connection setup code
* the same way as a cloned listening port