commit libFS for openSUSE:Factory
Hello community, here is the log from the commit of package libFS for openSUSE:Factory checked in at 2014-05-10 08:31:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libFS (Old) and /work/SRC/openSUSE:Factory/.libFS.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libFS" Changes: -------- --- /work/SRC/openSUSE:Factory/libFS/libFS.changes 2013-11-26 06:11:55.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libFS.new/libFS.changes 2014-05-10 08:32:09.000000000 +0200 @@ -1,0 +2,9 @@ +Wed May 7 09:47:51 UTC 2014 - sndirsch@suse.com + +- Update to version 1.0.6 + * This minor maintenance release includes fixes for libxtrans 1.3 + compatibility, removal of dead code, and cleanups of issues + found by static analyzers. +- supersedes U_fix_build_with_xtrans_1.3.patch + +------------------------------------------------------------------- Old: ---- U_fix_build_with_xtrans_1.3.patch libFS-1.0.5.tar.bz2 New: ---- libFS-1.0.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libFS.spec ++++++ --- /var/tmp/diff_new_pack.ywkVDz/_old 2014-05-10 08:32:10.000000000 +0200 +++ /var/tmp/diff_new_pack.ywkVDz/_new 2014-05-10 08:32:10.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package libFS # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: libFS %define lname libFS6 -Version: 1.0.5 +Version: 1.0.6 Release: 0 Summary: X Font Service client library License: MIT @@ -29,7 +29,6 @@ #Git-Web: http://cgit.freedesktop.org/xorg/lib/libFS/ Source: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2 Source2: baselibs.conf -Patch0: U_fix_build_with_xtrans_1.3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build #git#BuildRequires: autoconf >= 2.60, automake, libtool @@ -65,7 +64,6 @@ %prep %setup -q -%patch0 -p1 %build %configure --docdir=%_docdir/%name --disable-static ++++++ libFS-1.0.5.tar.bz2 -> libFS-1.0.6.tar.bz2 ++++++ ++++ 5836 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/libFS-1.0.5/ChangeLog new/libFS-1.0.6/ChangeLog --- old/libFS-1.0.5/ChangeLog 2013-05-29 02:18:34.000000000 +0200 +++ new/libFS-1.0.6/ChangeLog 2014-03-16 19:04:02.000000000 +0100 @@ -1,3 +1,220 @@ +commit 88be5c37c40070305e64c4b8dc0a1c1f6ca80440 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Mar 16 10:44:14 2014 -0700 + + libFS 1.0.6 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e5be46eceee9c0c0d5f0363d3e08b19f86f85fcb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 23:07:12 2014 -0800 + + Use strlcpy instead of strcpy/strncpy if it is available + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e831ef9246684298c147f9b26de0810b8218c3cb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 21:33:10 2014 -0800 + + Replace malloc(strlen + 1); strcpy() with strdup() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit 980cf8ac0c636ff7ef1fccb9e74f116ac5ea34ae +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 21:13:30 2014 -0800 + + Remove unused internal helper _FSWireToEvent + + Since we build with -export-symbols-regex '^FS.*', it wasn't available + to callers outside libFS, and was never called by anything inside libFS. + + Seems to have been imported from XlibInt.c without ever being used. + + Flagged by cppcheck 1.62: + [FSlibInt.c:753]: (style) The function '_FSWireToEvent' is never used. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit b9f27dc863c3ca01bb231ee48e84bc60b39d4f1f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 20:55:33 2014 -0800 + + Remove unused internal helper _FSEventsQueued + + Since we build with -export-symbols-regex '^FS.*', it wasn't available + to callers outside libFS, and was never called by anything inside libFS. + + Seems to have been imported from XlibInt.c without ever being used. + + Flagged by cppcheck 1.62: + [FSlibInt.c:180]: (style) The function '_FSEventsQueued' is never used. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit 37772516acb95b3c9934252994b7dfdc147dfd23 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 20:50:32 2014 -0800 + + Remove unused internal helper _FSAllocScratch + + Since we build with -export-symbols-regex '^FS.*', it wasn't available + to callers outside libFS, and was never called by anything inside libFS. + + Seems to have been imported from XlibInt.c without ever being used. + The _FSserver fields that it used (and nothing else did) are replaced + with "unused" placeholders to maintain struct layout/size. + + Flagged by cppcheck 1.62: + [FSlibInt.c:973]: (style) The function '_FSAllocScratch' is never used. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit ac1eb6e3ea54724cf3ab3ad1ccf0595df9e34786 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 20:46:48 2014 -0800 + + Remove unused internal helper _FSGetHostname + + Since we build with -export-symbols-regex '^FS.*', it wasn't available + to callers outside libFS, and was never called by anything inside libFS. + + Xtrans provides it's own exact copy of this function, which gets + the name _FSTransGetHostname when built in libFS, nothing in libFS + outside the Xtrans code calls a gethostname() function. + + Flagged by cppcheck 1.62: + [FSlibInt.c:1060]: (style) The function '_FSGetHostname' is never used. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit a4c12fe0ca5cb359bffe08b26a92ddcf8e194441 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 20:04:33 2014 -0800 + + If EAGAIN == EWOULDBLOCK, only need to check errno for one of them + + Solaris <sys/errno.h> has: + #define EWOULDBLOCK EAGAIN + so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill. + + This leads cppcheck 1.62 to complain: + [FSlibInt.c:153] -> [FSlibInt.c:153]: (style) Same expression on both sides of '||'. + [FSlibInt.c:301] -> [FSlibInt.c:301]: (style) Same expression on both sides of '||'. + [FSlibInt.c:379] -> [FSlibInt.c:379]: (style) Same expression on both sides of '||'. + [FSlibInt.c:472] -> [FSlibInt.c:472]: (style) Same expression on both sides of '||'. + + This quiets it, and reduces the number of calls Solaris Studio cc + generates to the __errno() function to get the thread-specific errno value. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> + +commit b6885f7aedc3b6eba62ffa1edac1e8488d938cea +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 3 19:57:09 2014 -0800 + + Reduce scope & remove unneeded assignment of defaultp in FSGetErrorText() + + Suggested by cppcheck 1.62 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit dcb6c39feb63dcf7e843bd2394a2544fd4e79f9f +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Thu Jan 2 01:03:49 2014 -0800 + + FSOpenServer: Fix double-free in error path + + FSOpenServ.c:266:5: warning: Use of memory after it is freed + OutOfMemory(svr, setup); + ^~~~~~~~~~~~~~~~~~~~~~~ + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit 4b0b74f953619164dc2863ee2cd3f09d15c65a51 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Thu Jan 2 00:49:27 2014 -0800 + + Update error loop to correctly handle error in i==0 case + + FSOpenServ.c:183:3: warning: Function call argument is an uninitialized value + FSfree(alts[i].name); + ^~~~~~~~~~~~~~~~~~~~ + ./FSlibos.h:273:21: note: expanded from macro 'FSfree' + ^~~~~~~~~~~ + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit 5ed8b4cf1f1c35ef35a3c94350e6b96646a2a0b7 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 27 11:01:35 2013 -0800 + + Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions + + Required on Solaris to expose fd_mask in <sys/select.h> now that + xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris, since fd_mask + is not defined in that version of the XPG standards. + + Fixes build failure: + ../../src/FSConnServ.c: In function '_FSWaitForWritable': + ../../src/FSConnServ.c:166:6: error: 'fd_mask' undeclared (first use in this function) + ../../src/FSConnServ.c:166:6: note: each undeclared identifier is reported only once for each function it appears in + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 19ca53de0aae67b1f23085c832b445576c6a0b25 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 1 11:14:58 2013 -0400 + + Fix build with xtrans 1.3 + + ->Readv was in fact being used, oops. Just call straight down to + readv() instead. + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 96243bfec19d0f543de3ef590a482f7f6dcdaa3d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jun 24 22:52:09 2013 -0700 + + Drop Cray (WORD64/MUSTCOPY) support + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit d30a927b79ee0faa5f4547d5d60570f8fcd11fc2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jun 24 22:46:52 2013 -0700 + + Fix a couple comment typos + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 665fb8c34183bbaba5c7deb045863090082f814b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jun 24 22:42:56 2013 -0700 + + Require ANSI C89 pre-processor, drop pre-C89 token pasting support + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 279fbcc23d6cd462e034dec6a9d1378cb86247e3 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue May 28 17:42:06 2013 -0700 + + Fix typo in readme ("xfslsfonts" should be "fslsfonts") + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit 9d1458e02fe8dcac68b32917c9b10fa49d7161e7 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue May 28 17:17:40 2013 -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/libFS-1.0.5/README new/libFS-1.0.6/README --- old/libFS-1.0.5/README 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/README 2014-03-16 19:03:42.000000000 +0100 @@ -1,7 +1,7 @@ libFS - X Font Service client library This library is used by clients of X Font Servers (xfs), such as -xfsinfo, xfslsfonts, and the X servers themselves. +xfsinfo, fslsfonts, and the X servers themselves. All questions regarding this software should be directed at the Xorg mailing 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/libFS-1.0.5/compile new/libFS-1.0.6/compile --- old/libFS-1.0.5/compile 1970-01-01 01:00:00.000000000 +0100 +++ new/libFS-1.0.6/compile 2014-03-16 19:03:52.000000000 +0100 @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# 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-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/libFS-1.0.5/config.h.in new/libFS-1.0.6/config.h.in --- old/libFS-1.0.5/config.h.in 2013-05-29 02:18:13.000000000 +0200 +++ new/libFS-1.0.6/config.h.in 2014-03-16 19:03:52.000000000 +0100 @@ -30,6 +30,9 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H @@ -79,9 +82,6 @@ /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -91,5 +91,40 @@ /* Support UNIX socket connections */ #undef UNIXCONN +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Version number of package */ #undef VERSION + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Defined if needed to expose struct msghdr.msg_control */ +#undef _XOPEN_SOURCE 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/libFS-1.0.5/configure.ac new/libFS-1.0.6/configure.ac --- old/libFS-1.0.5/configure.ac 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/configure.ac 2014-03-16 19:03:42.000000000 +0100 @@ -22,7 +22,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libFS], [1.0.5], +AC_INIT([libFS], [1.0.6], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libFS]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -30,6 +30,11 @@ # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like +# AC_PROG_LIBTOOL) to avoid autoconf errors. +AC_USE_SYSTEM_EXTENSIONS + # Initialize libtool AC_PROG_LIBTOOL @@ -46,6 +51,9 @@ # Find needed libraries for TCP sockets (pre-pended in $LIBS) XTRANS_CONNECTION_FLAGS +# Checks for library functions. +AC_CHECK_FUNCS([strlcpy]) + # Allow checking code with lint, sparse, etc. XORG_WITH_LINT XORG_LINT_LIBRARY([FS]) 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/libFS-1.0.5/include/X11/fonts/FSlib.h new/libFS-1.0.6/include/X11/fonts/FSlib.h --- old/libFS-1.0.5/include/X11/fonts/FSlib.h 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/include/X11/fonts/FSlib.h 2014-03-16 19:03:42.000000000 +0100 @@ -148,8 +148,8 @@ int ext_number; Bool (*event_vec[132]) (FSServer *, FSEvent *, fsEvent *); Status (*wire_vec[132]) (FSServer *, FSEvent *, fsEvent *); - char *scratch_buffer; - unsigned long scratch_length; + void *unused_1; /* previously scratch_buffer */ + unsigned long unused_2; /* previously scratch_length */ FSSyncHandler synchandler; unsigned long flags; struct _XtransConnInfo *trans_conn; /* transport connection object */ 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/libFS-1.0.5/src/FSErrDis.c new/libFS-1.0.6/src/FSErrDis.c --- old/libFS-1.0.5/src/FSErrDis.c 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/src/FSErrDis.c 2014-03-16 19:03:42.000000000 +0100 @@ -84,9 +84,14 @@ { if (nbytes == 0) return 0; +#ifdef HAVE_STRLCPY + if (strlcpy(buffer, defaultp, nbytes) >= nbytes) + return 0; +#else (void) strncpy(buffer, defaultp, nbytes); if ((strlen(defaultp) + 1) > nbytes) buffer[nbytes - 1] = '\0'; +#endif return 1; } @@ -96,8 +101,6 @@ char *buffer, int nbytes) { - - const char *defaultp = NULL; char buf[32]; register _FSExtension *ext; @@ -105,7 +108,7 @@ return 0; snprintf(buf, sizeof(buf), "%d", code); if (code < (FSErrorListSize / sizeof(char *)) && code >= 0) { - defaultp = FSErrorList[code]; + const char *defaultp = FSErrorList[code]; FSGetErrorDatabaseText(svr, "FSProtoError", buf, defaultp, buffer, nbytes); } ext = svr->ext_procs; 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/libFS-1.0.5/src/FSOpenServ.c new/libFS-1.0.6/src/FSOpenServ.c --- old/libFS-1.0.5/src/FSOpenServ.c 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/src/FSOpenServ.c 2014-03-16 19:03:42.000000000 +0100 @@ -66,7 +66,7 @@ 0, 0, 0 }; -static void OutOfMemory ( FSServer *svr, char *setup ); +static void OutOfMemory ( FSServer *svr ); FSServer *_FSHeadOfServerList = NULL; @@ -85,13 +85,11 @@ static void OutOfMemory( - FSServer *svr, - char *setup) + FSServer *svr) { if (svr->trans_conn) _FSDisconnectServer(svr->trans_conn); _FSFreeServerStructure(svr); - FSfree(setup); errno = ENOMEM; } @@ -129,10 +127,9 @@ return (FSServer *) NULL; } - if ((svr->server_name = FSmalloc(strlen(server) + 1)) == NULL) { + if ((svr->server_name = strdup(server)) == NULL) { goto fail; } - (void) strcpy(svr->server_name, server); if ((svr->trans_conn = _FSConnectServer(svr->server_name)) == NULL) { goto fail; @@ -179,7 +176,7 @@ altlen = (unsigned int) *ad++; alts[i].name = FSmalloc(altlen + 1); if (!alts[i].name) { - while (--i) { + while (--i >= 0) { FSfree(alts[i].name); } goto fail; @@ -263,7 +260,7 @@ FSfree(alts); FSfree(alt_data); FSfree(auth_data); - OutOfMemory(svr, setup); + OutOfMemory(svr); return (FSServer *) NULL; } 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/libFS-1.0.5/src/FSlibInt.c new/libFS-1.0.6/src/FSlibInt.c --- old/libFS-1.0.5/src/FSlibInt.c 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/src/FSlibInt.c 2014-03-16 19:03:42.000000000 +0100 @@ -58,6 +58,7 @@ #endif #include <stdio.h> #include "FSlibint.h" +#include <X11/Xtrans/Xtransint.h> #include <X11/Xos.h> static void _EatData32 ( FSServer *svr, unsigned long n ); @@ -65,11 +66,14 @@ /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX * systems are broken and return EWOULDBLOCK when they should return EAGAIN + * + * Solaris defines EWOULDBLOCK to be EAGAIN, so don't need to check twice + * for it. */ #ifdef WIN32 #define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) #else -#if defined(EAGAIN) && defined(EWOULDBLOCK) +#if defined(EAGAIN) && defined(EWOULDBLOCK) && (EAGAIN != EWOULDBLOCK) #define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) #else #ifdef EAGAIN @@ -172,42 +176,6 @@ svr->last_req = (char *) &_dummy_request; } -int -_FSEventsQueued( - register FSServer *svr, - int mode) -{ - register BytesReadable_t len; - BytesReadable_t pend; - char buf[BUFSIZE]; - register fsReply *rep; - - if (mode == QueuedAfterFlush) { - _FSFlush(svr); - if (svr->qlen) - return (svr->qlen); - } - if (_FSTransBytesReadable(svr->trans_conn, &pend) < 0) - (*_FSIOErrorFunction) (svr); - if ((len = pend) < SIZEOF(fsReply)) - return (svr->qlen); /* _FSFlush can enqueue events */ - else if (len > BUFSIZE) - len = BUFSIZE; - len /= SIZEOF(fsReply); - pend = len * SIZEOF(fsReply); - _FSRead(svr, buf, (long) pend); - - /* no space between comma and type or else macro will die */ - STARTITERATE(rep, fsReply, buf, (len > 0), len--) { - if (rep->generic.type == FS_Error) - _FSError(svr, (fsError *) rep); - else /* must be an event packet */ - _FSEnq(svr, (fsEvent *) rep); - } - ENDITERATE - return (svr->qlen); -} - /* _FSReadEvents - Flush the output queue, * then read as many events as possible (but at least 1) and enqueue them */ @@ -330,137 +298,6 @@ } } -#ifdef WORD64 -/* - * XXX This is a *really* stupid way of doing this.... - */ - -#define PACKBUFFERSIZE 4096 - - -/* - * _FSRead32 - Read bytes from the socket unpacking each 32 bits - * into a long (64 bits on a CRAY computer). - * - */ -static void -_doFSRead32( - register FSServer *svr, - register long *data, - register long size, - register char *packbuffer) -{ - long *lpack, - *lp; - long mask32 = 0x00000000ffffffff; - long maskw, - nwords, - i, - bits; - - _FSReadPad(svr, packbuffer, size); - - lp = data; - lpack = (long *) packbuffer; - nwords = size >> 2; - bits = 32; - - for (i = 0; i < nwords; i++) { - maskw = mask32 << bits; - *lp++ = (*lpack & maskw) >> bits; - bits = bits ^ 32; - if (bits) { - lpack++; - } - } -} - -void -_FSRead32( - FSServer *svr, - long *data, - long len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ - - for (; len > nwords; len -= nwords, data += nwords) { - _doFSRead32(svr, data, nwords, packbuffer); - } - _doFSRead32(svr, data, len, packbuffer); -} - - - -/* - * _FSRead16 - Read bytes from the socket unpacking each 16 bits - * into a long (64 bits on a CRAY computer). - * - */ -static void -_doFSRead16( - register FSServer *svr, - register short *data, - register long size, - char *packbuffer) -{ - long *lpack, - *lp; - long mask16 = 0x000000000000ffff; - long maskw, - nwords, - i, - bits; - - _FSRead(svr, packbuffer, size); /* don't do a padded read... */ - - lp = (long *) data; - lpack = (long *) packbuffer; - nwords = size >> 1; /* number of 16 bit words to be unpacked */ - bits = 48; - for (i = 0; i < nwords; i++) { - maskw = mask16 << bits; - *lp++ = (*lpack & maskw) >> bits; - bits -= 16; - if (bits < 0) { - lpack++; - bits = 48; - } - } -} - -void -_FSRead16( - FSServer *svr, - short *data, - long len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ - - for (; len > nwords; len -= nwords, data += nwords) { - _doFSRead16(svr, data, nwords, packbuffer); - } - _doFSRead16(svr, data, len, packbuffer); -} - -void -_FSRead16Pad( - FSServer *svr, - short *data, - long size) -{ - int slop = (size & 3); - short slopbuf[3]; - - _FSRead16(svr, data, size); - if (slop > 0) { - _FSRead16(svr, slopbuf, 4 - slop); - } -} - -#endif /* WORD64 */ - /* * _FSReadPad - Read bytes from the socket taking into account incomplete @@ -491,7 +328,7 @@ size += iov[1].iov_len; ESET(0); - while ((bytes_read = _FSTransReadv(svr->trans_conn, iov, 2)) != size) { + while ((bytes_read = readv(svr->trans_conn->fd, iov, 2)) != size) { if (bytes_read > 0) { size -= bytes_read; @@ -683,7 +520,7 @@ register fsReply *rep, int extra, /* number of 32-bit words expected after the * reply */ - Bool discard)/* should I discard data followind "extra" + Bool discard)/* should I discard data following "extra" * words? */ { /* @@ -909,35 +746,6 @@ return (0); } -/* - * reformat a wire event into an FSEvent structure of the right type. - */ -Bool -_FSWireToEvent( - register FSServer *svr, /* pointer to display structure */ - register FSEvent *re, /* pointer to where event should be - * reformatted */ - register fsEvent *event) /* wire protocol event */ -{ - - re->type = event->type & 0x7f; - ((FSAnyEvent *) re)->serial = _FSSetLastRequestRead(svr, - (fsGenericReply *) event); - ((FSAnyEvent *) re)->send_event = ((event->type & 0x80) != 0); - ((FSAnyEvent *) re)->server = svr; - - /* - * Ignore the leading bit of the event type since it is set when a client - * sends an event rather than the server. - */ - - switch (event->type & 0177) { - default: - return (_FSUnknownWireEvent(svr, re, event)); - } -} - - static const char * _SysErrorMsg(int n) { @@ -1042,7 +850,11 @@ ext && (ext->codes.major_opcode != event->request_code); ext = ext->next); if (ext) +#ifdef HAVE_STRLCPY + strlcpy(buffer, ext->name, sizeof(buffer)); +#else strcpy(buffer, ext->name); +#endif else buffer[0] = '\0'; } @@ -1091,25 +903,6 @@ FSIOErrorHandler _FSIOErrorFunction = _FSDefaultIOError; FSErrorHandler _FSErrorFunction = _FSDefaultError; -/* - * This routine can be used to (cheaply) get some memory within a single - * Xlib routine for scratch space. It is reallocated from the same place - * each time, unless the library needs a large scratch space. - */ -char * -_FSAllocScratch( - register FSServer *svr, - unsigned long nbytes) -{ - if (nbytes > svr->scratch_length) { - if (svr->scratch_buffer != NULL) - FSfree(svr->scratch_buffer); - return (svr->scratch_length = nbytes, - svr->scratch_buffer = FSmalloc(nbytes)); - } - return (svr->scratch_buffer); -} - int FSFree(char *data) { @@ -1141,138 +934,6 @@ #endif /* DataRoutineIsProcedure */ -#ifdef WORD64 -/* - * XXX This is a *really* stupid way of doing this. It should just use - * svr->bufptr directly, taking into account where in the word it is. - */ - -/* - * Data16 - Place 16 bit data in the buffer. - * - * "svr" is a pointer to a FSServer. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static void -doData16( - register FSServer *svr, - short *data, - unsigned len, - char *packbuffer) -{ - long *lp, - *lpack; - long i, - nwords, - bits; - long mask16 = 0x000000000000ffff; - - lp = (long *) data; - lpack = (long *) packbuffer; - *lpack = 0; - -/* nwords is the number of 16 bit values to be packed, - * the low order 16 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 1; - bits = 48; - - for (i = 0; i < nwords; i++) { - *lpack ^= (*lp & mask16) << bits; - bits -= 16; - lp++; - if (bits < 0) { - lpack++; - *lpack = 0; - bits = 48; - } - } - Data(svr, packbuffer, len); -} - -void -Data16( - FSServer *svr, - short *data, - unsigned len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ - - for (; len > nwords; len -= nwords, data += nwords) { - doData16(svr, data, nwords, packbuffer); - } - doData16(svr, data, len, packbuffer); -} - -/* - * Data32 - Place 32 bit data in the buffer. - * - * "svr" is a pointer to a FSServer. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static -doData32( - register FSServer *svr, - long *data, - unsigned len, - char *packbuffer) -{ - long *lp, - *lpack; - long i, - bits, - nwords; - long mask32 = 0x00000000ffffffff; - - lpack = (long *) packbuffer; - lp = data; - - *lpack = 0; - -/* nwords is the number of 32 bit values to be packed - * the low order 32 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 2; - bits = 32; - - for (i = 0; i < nwords; i++) { - *lpack ^= (*lp & mask32) << bits; - bits = bits ^ 32; - lp++; - if (bits) { - lpack++; - *lpack = 0; - } - } - Data(svr, packbuffer, len); -} - -void -Data32( - FSServer *svr, - short *data, - unsigned len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ - - for (; len > nwords; len -= nwords, data += nwords) { - doData32(svr, data, nwords, packbuffer); - } - doData32(svr, data, len, packbuffer); -} - -#endif /* WORD64 */ - - - /* * _FSFreeQ - free the queue of events, called by XCloseServer when there are * no more displays left on the display list @@ -1293,57 +954,6 @@ return; } -#ifdef _POSIX_SOURCE /* stupid makedepend [need if] */ -#ifndef __QNX__ /* QNX's uname nodename entry is not same as tcpip hostname */ -#define NEED_UTSNAME -#endif -#endif -#ifdef hpux -#define NEED_UTSNAME -#endif -#ifdef SVR4 -#ifndef _SEQUENT_ -#define NEED_UTSNAME -#endif -#endif - -#ifdef NEED_UTSNAME -#include <sys/utsname.h> -#endif - - -/* - * _FSGetHostname - similar to gethostname but allows special processing. - */ -int -_FSGetHostname( - char *buf, - int maxlen) -{ - int len; - -#ifdef NEED_UTSNAME - /* - * same host name crock as in server and xinit. - */ - struct utsname name; - - uname(&name); - len = strlen(name.nodename); - if (len >= maxlen) - len = maxlen - 1; - strncpy(buf, name.nodename, len); - buf[len] = '\0'; -#else - buf[0] = '\0'; - (void) gethostname(buf, maxlen); - buf[maxlen - 1] = '\0'; - len = strlen(buf); -#endif /* NEED_UTSNAME */ - - return len; -} - #ifndef _FSANYSET /* * This is not always a macro. 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/libFS-1.0.5/src/FSlibint.h new/libFS-1.0.6/src/FSlibint.h --- old/libFS-1.0.5/src/FSlibint.h 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/src/FSlibint.h 2014-03-16 19:03:42.000000000 +0100 @@ -82,20 +82,16 @@ extern XtransConnInfo _FSConnectServer ( char *server_name ); extern void _FSDisconnectServer ( XtransConnInfo trans_conn ); extern void _FSSendClientPrefix ( FSServer *svr, fsConnClientPrefix *client ); -extern int _FSEventsQueued ( FSServer *svr, int mode ); extern unsigned long _FSSetLastRequestRead ( FSServer *svr, fsGenericReply *rep ); extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event ); extern int _FSUnknownNativeEvent ( FSServer *svr, FSEvent *re, fsEvent *event ); -extern int _FSWireToEvent ( FSServer *svr, FSEvent *re, fsEvent *event ); extern int _FSDefaultIOError ( FSServer *svr ) _X_NORETURN; extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event, FILE *fp ); extern int _FSDefaultError ( FSServer *svr, FSErrorEvent *event ); -extern char * _FSAllocScratch ( FSServer *svr, unsigned long nbytes ); extern void _FSFreeQ ( void ); -extern int _FSGetHostname ( char *buf, int maxlen ); extern FSErrorHandler FSSetErrorHandler ( FSErrorHandler handler ); extern FSIOErrorHandler FSSetIOErrorHandler ( FSIOErrorHandler handler ); @@ -113,30 +109,9 @@ #define FSlibServerIOError (1L << 0) #define FSlibServerClosing (1L << 1) -/* Need to start requests on 64 bit word boundries - * on a CRAY computer so add a NoOp (127) if needed. - * A character pointer on a CRAY computer will be non-zero - * after shifting right 61 bits of it is not pointing to - * a word boundary. - */ - -#ifdef WORD64 -#define WORD64ALIGN if ((long)svr->bufptr >> 61) {\ - svr->last_req = svr->bufptr;\ - *(svr->bufptr) = FS_Noop;\ - *(svr->bufptr+1) = 0;\ - *(svr->bufptr+2) = 0;\ - *(svr->bufptr+3) = 1;\ - svr->request += 1;\ - svr->bufptr += 4;\ - } -#else /* else does not require alignment on 64-bit - * boundaries */ -#define WORD64ALIGN -#endif /* WORD64 */ /* - * GetReq - Get the next avilable FS request packet in the buffer and + * GetReq - Get the next available FS request packet in the buffer and * return it. * * "name" is the name of the request, e.g. InternAtom, OpenFont, etc. @@ -144,9 +119,7 @@ * */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReq(name, req) \ - WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fs##name##Req)) > svr->bufmax)\ _FSFlush(svr);\ req = (fs##name##Req *)(svr->last_req = svr->bufptr);\ @@ -155,25 +128,10 @@ svr->bufptr += SIZEOF(fs##name##Req);\ svr->request++ -#else /* non-ANSI C uses empty comment instead of - * "##" for token concatenation */ -#define GetReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs/**/name/**/Req)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs/**/name/**/Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = (SIZEOF(fs/**/name/**/Req))>>2;\ - svr->bufptr += SIZEOF(fs/**/name/**/Req);\ - svr->request++ -#endif - /* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReqExtra(name, n, req) \ - WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fs##name##Req) + n) > svr->bufmax)\ _FSFlush(svr);\ req = (fs##name##Req *)(svr->last_req = svr->bufptr);\ @@ -181,18 +139,6 @@ req->length = (SIZEOF(fs##name##Req) + n)>>2;\ svr->bufptr += SIZEOF(fs##name##Req) + n;\ svr->request++ -#else -#define GetReqExtra(name, n, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs/**/name/**/Req) + n) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs/**/name/**/Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = (SIZEOF(fs/**/name/**/Req) + n)>>2;\ - svr->bufptr += SIZEOF(fs/**/name/**/Req) + n;\ - svr->request++ -#endif - /* * GetResReq is for those requests that have a resource ID @@ -200,9 +146,7 @@ * "rid" is the name of the resource. */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define GetResReq(name, rid, req) \ - WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fsResourceReq)) > svr->bufmax)\ _FSFlush(svr);\ req = (fsResourceReq *) (svr->last_req = svr->bufptr);\ @@ -211,27 +155,13 @@ req->id = (rid);\ svr->bufptr += SIZEOF(fsResourceReq);\ svr->request++ -#else -#define GetResReq(name, rid, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsResourceReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsResourceReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = 2;\ - req->id = (rid);\ - svr->bufptr += SIZEOF(fsResourceReq);\ - svr->request++ -#endif /* * GetEmptyReq is for those requests that have no arguments * at all. */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define GetEmptyReq(name, req) \ - WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fsReq)) > svr->bufmax)\ _FSFlush(svr);\ req = (fsReq *) (svr->last_req = svr->bufptr);\ @@ -239,17 +169,6 @@ req->length = 1;\ svr->bufptr += SIZEOF(fsReq);\ svr->request++ -#else -#define GetEmptyReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = 1;\ - svr->bufptr += SIZEOF(fsReq);\ - svr->request++ -#endif #define SyncHandle() \ if (svr->synchandler) (*svr->synchandler)(svr) @@ -300,13 +219,11 @@ /* * provide emulation routines for smaller architectures */ -#ifndef WORD64 #define Data16(dpy, data, len) Data((dpy), (char *)(data), (len)) #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len)) #define _FSRead16Pad(dpy, data, len) _FSReadPad((dpy), (char *)(data), (len)) #define _FSRead16(dpy, data, len) _FSRead((dpy), (char *)(data), (len)) #define _FSRead32(dpy, data, len) _FSRead((dpy), (char *)(data), (len)) -#endif /* not WORD64 */ #define PackData16(dpy,data,len) Data16 (dpy, data, len) #define PackData32(dpy,data,len) Data32 (dpy, data, len) @@ -314,20 +231,6 @@ #define min(a,b) (((a) < (b)) ? (a) : (b)) #define max(a,b) (((a) > (b)) ? (a) : (b)) -#ifdef MUSTCOPY -/* a little bit of magic */ -#define OneDataCard32(svr,dstaddr,srcvar) \ - { svr->bufptr -= 4; Data32 (svr, (char *) &(srcvar), 4); } - -#define STARTITERATE(tpvar,type,start,endcond,decr) \ - { register char *cpvar; \ - for (cpvar = (char *) start; endcond; cpvar = NEXTPTR(cpvar,type), decr) { \ - type dummy; memmove ((char *) &dummy, cpvar, SIZEOF(type)); \ - tpvar = (type *) cpvar; -#define ENDITERATE }} - -#else - /* srcvar must be a variable for large architecture version */ #define OneDataCard32(svr,dstaddr,srcvar) \ { *(unsigned long *)(dstaddr) = (srcvar); } @@ -335,15 +238,9 @@ #define STARTITERATE(tpvar,type,start,endcond,decr) \ for (tpvar = (type *) start; endcond; tpvar++, decr) { #define ENDITERATE } -#endif /* MUSTCOPY - used machines whose C structs - * don't line up with proto */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define FSCat(x,y) x##_##y -#else -#define FSCat(x,y) x/**/_/**/y -#endif /* copy XCharInfo parts of a protocol reply into a FSXCharInfo */ 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/libFS-1.0.5/src/FSlibos.h new/libFS-1.0.6/src/FSlibos.h --- old/libFS-1.0.5/src/FSlibos.h 2013-05-29 02:17:52.000000000 +0200 +++ new/libFS-1.0.6/src/FSlibos.h 2014-03-16 19:03:42.000000000 +0100 @@ -129,12 +129,7 @@ #undef dirty #endif -#ifdef WORD64 -#define NMSKBITS 64 -#else #define NMSKBITS 32 -#endif - #define MSKCNT ((FS_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) #ifdef LONG64 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de